Global

Members

addGeoLink.
Source:

(constant) addGeoLinkByDrag

addGeoLinkByDrag.
Source:

(constant) addGeoSchemeByText

addGeoSchemeByText.
Source:

(constant) addMarker

addMarker.
Source:

(constant) addMarkerByPoint

addMarkerByPoint.
Source:
addRefLink. replace selected text into markdown link by reference style links
Source:

(constant) animateRectTransition

Animate transition of DOMRect, with Web Animation API
Source:

(constant) cm

CodeMirror Instance
Source:

(constant) contentFromHash

Hash and Query Parameters in URL
Source:

(constant) context

Variables: dumbymap and editor
Source:

(constant) coordPattern

VAR: pattern for coodinates
Source:

(constant) defaultLayouts

VAR: Default Layouts
Source:

(constant) defaultRender

Get default render method by converter
Source:
DocLink: append DocLink features onto anchor element
Source:

(constant) editMapByRawText

editByRawText.
Source:

(constant) editor

Editor from EasyMDE
Source:

(constant) Folder

Creates a new menu item that generates a submenu on hover
Source:

(constant) full2Half

full2Half: full-Width Digits To Half-Width.
Source:

(constant) generateMaps

Generates maps based on the provided configuration
Source:
GeoLink: append GeoLink features onto anchor element
Source:

(constant) getCoordinatesByPixels

getCoordinatesByPixels.
Source:

(constant) getMarkersFromMaps

GeoLink: getMarkersFromMaps. Get marker elements by GeoLink
Source:

(constant) insideParent

insideParent. check children element is inside DOMRect of parent element
Source:

(constant) insideWindow

insideWindow. check DOMRect is inside window
Source:

(constant) Item

Creates a Item instance
Source:

(constant) mapBlockSelector

VAR: CSS Selector for main components
Source:

(constant) mapCache

VAR: Cache across every dumbymap generation
Source:

(constant) markdown2HTML

Converts Markdown content to HTML and prepares it for DumbyMap rendering
Source:

(constant) onRemove

Do callback when HTMLElement in removed
Source:

(constant) pickBlockItem

pickBlockItem.
Source:

(constant) pickLayoutItem

pickLayoutItem.
Source:

(constant) pickMapItem

Pick up a map
Source:

(constant) refLinkPattern

Variables: Reference Style Links in Markdown
Source:

(constant) removeLeaderLines

removeLeaderLines. clean lines start from link
Source:

(constant) renderResults

renderResults. return a menu item for reporting render results
Source:

(constant) replaceTextNodes

Search current nodes by pattern, and replace them by new node
Source:
To Do:
  • refactor to smaller methods

(constant) restoreCamera

restoreCamera.
Source:

(constant) scrollToBlock

scrollToBlock. Smoothly scroll to target block. If block is bigger than viewport, then pick strategy wisely.
Source:

(constant) setGeoLinkType

setGeoLinkType.
Source:

(constant) setGeoLinkTypeItem

setGeoLinkTypeItem.
Source:

(constant) setLeaderLineType

set type of leader-line
Source:

(constant) shiftByWindow

shiftByWindow. make sure HTMLElement inside viewport
Source:

(constant) Suggestion

Suggestion. Menu Item for editor suggestion.
Source:

(constant) toggleBlockFocus

toggleBlockFocus. Menu Item for toggling focus on a block
Source:

(constant) toggleMapFocus

toggleMapFocus. Menu Item for toggling focus on a map
Source:

(constant) updateGeoSchemeByCRS

Add more information into Anchor Element within Geo Scheme by CRS
Source:

(constant) url

Variables: page
Source:

Methods

addClassToCodeLines()

addClassToCodeLines. Quick hack to style lines inside code block
Source:

addDraggable(element)

addDraggable.
Parameters:
Name Type Description
element HTMLElement
Source:

addMapRandomlyByPreset()

addMapRandomlyByPreset. insert random text of valid mapclay yaml into editor
Source:

addSuggestions(anchor, suggestions)

addSuggestions. Show element about suggestions {{{
Parameters:
Name Type Description
anchor Object Codemirror Anchor Object
suggestions Array.<Suggestion>
Source:

completeForCodeBlock(change)

completeForCodeBlock.
Parameters:
Name Type Description
change Object codemirror change object
Source:

debounce(func, delay)

debounce.
Parameters:
Name Type Description
func function
delay Number milliseconds
Source:

focusDelay()

focusDelay. Delay of throttle, value changes by cases
Source:

focusNextBlock(reverse)

focusNextBlock.
Parameters:
Name Type Description
reverse Boolean focus previous block
Source:

focusNextMap(reverse)

focusNextMap.
Parameters:
Name Type Description
reverse Boolean focus previous map
Source:

getCommonAncestor(selector) → {Element}

Get the common ancestor of two or more elements https://gist.github.com/kieranbarker/cd86310d0782b7c52ce90cd7f45bb3eb
Parameters:
Name Type Description
selector String A valid CSS selector
Source:
Returns:
The common ancestor
Type
Element

getContentFromHash(hash)

get editor content from hash string
Parameters:
Name Type Description
hash String
Source:

getLineWithRenderer(anchor)

getLineWithRenderer. Get Renderer by cursor position in code block {{{
Parameters:
Name Type Description
anchor Object Codemirror Anchor Object
Source:
getRefLinks from contents of editor
Source:
Returns:
refLinks
Type
Array.<RefLink>

getStateFromHash(hash)

get state of website from hash string
Parameters:
Name Type Description
hash String
Source:

getSuggestionFromMapOption(option)

getSuggestionFromMapOption. Return suggestion for example of option value {{{
Parameters:
Name Type Description
option Object
Source:

getSuggestions(anchor)

getSuggestions. Get suggestions by current input {{{
Parameters:
Name Type Description
anchor Object Codemirror Anchor Object
Source:

getSuggestionsForOptions(optionTyped, validOptions)

getSuggestionsForOptions. Return suggestions for valid options {{{
Parameters:
Name Type Description
optionTyped Boolean
validOptions Array.<Object>
Source:

getSuggestionsFromAliases(option)

getSuggestionsFromAliases. Return suggestions from aliases {{{
Parameters:
Name Type Description
option Object
Source:

handleTypingInCodeBlock(anchor)

handleTypingInCodeBlock. Handler for map codeblock {{{
Parameters:
Name Type Description
anchor Object Codemirror Anchor Object
Source:

insideCodeblockForMap(anchor)

insideCodeblockForMap. Check if current token is inside code block {{{
Parameters:
Name Type Description
anchor Anchor
Source:

isAnchorVisible(anchor)

isAnchorVisible. check anchor(marker) is visible for current map camera
Parameters:
Name Type Description
anchor Element
Source:
menuForEditor.
Parameters:
Name Type Description
event Event Event for context menu
menu HTMLElement menu of dumbymap
Source:

printObject(obj, parentElement, name)

printObject. Generate
in parent element based on Ojbect properties
Parameters:
Name Type Default Description
obj Object
parentElement HTMLElement
name String null
Source:

removeBlockFocus()

removeBlockFocus.
Source:

switchToNextLayout(reverse)

switchToNextLayout.
Parameters:
Name Type Description
reverse Boolean Switch to previous one
Source:

throttle(func, delay) → {Any}

Throttle for function call
Parameters:
Name Type Description
func function
delay Number milliseconds
Source:
Returns:
return value of function call, or null if throttled
Type
Any

toggleEditing()

Toggles the editing mode
Source:

updateAttributeByStep()

Update data attribute by steps of map render
Parameters:
Type Description
Object renderer which is running steps
Source:

updateCMScrollLine(cm)

updateScrollLineByCodeMirror.
Parameters:
Name Type Description
cm CodeMirror
Source:

updateDumbyMap()

update content of HTML about Dumbymap
Source:

updateMapCameraByMarker(xy) → {function}

updateMapByMarker. get function for updating map camera by marker
Parameters:
Name Type Description
xy Array.<Number>
Source:
Returns:
function
Type
function

updateScrollLine(ele)

updateScrollLine. Update data attribute by scroll on given element
Parameters:
Name Type Description
ele HTMLElement
Source:

Type Definitions

DocLink: anchor element which points to DOM node by filter
Type:
  • Object
Properties:
Name Type Description
lines Array.<LeaderLine>
Source:
anchor element with geo scheme and properties about maps
Type:
  • Object
Properties:
Name Type Description
targets Array.<string> ids of target map elements
lines Array.<LeaderLine>
dataset Object
Properties
Name Type Description
lon string longitude string of geo scheme
lat string latitude string of geo scheme
crs string short name of CRS in EPSG/ESRI format
Source:
Type:
  • Object
Properties:
Name Type Description
ref string name of link
link string content of link
title string | null title of link
Source:
Type:
  • Object
Properties:
Name Type Description
ref string name of link
link string content of link
title string | null title of link
Source: