@tabler/core 1.3.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/css/tabler-flags.css +1 -1
  2. package/dist/css/tabler-flags.min.css +1 -1
  3. package/dist/css/tabler-flags.rtl.css +1 -1
  4. package/dist/css/tabler-flags.rtl.min.css +1 -1
  5. package/dist/css/tabler-marketing.css +1 -1
  6. package/dist/css/tabler-marketing.min.css +1 -1
  7. package/dist/css/tabler-marketing.rtl.css +1 -1
  8. package/dist/css/tabler-marketing.rtl.min.css +1 -1
  9. package/dist/css/tabler-payments.css +1 -1
  10. package/dist/css/tabler-payments.min.css +1 -1
  11. package/dist/css/tabler-payments.rtl.css +1 -1
  12. package/dist/css/tabler-payments.rtl.min.css +1 -1
  13. package/dist/css/tabler-props.css +74 -74
  14. package/dist/css/tabler-props.css.map +1 -1
  15. package/dist/css/tabler-props.min.css +2 -2
  16. package/dist/css/tabler-props.min.css.map +1 -1
  17. package/dist/css/tabler-props.rtl.css +74 -74
  18. package/dist/css/tabler-props.rtl.css.map +1 -1
  19. package/dist/css/tabler-props.rtl.min.css +2 -2
  20. package/dist/css/tabler-props.rtl.min.css.map +1 -1
  21. package/dist/css/tabler-socials.css +1 -1
  22. package/dist/css/tabler-socials.min.css +1 -1
  23. package/dist/css/tabler-socials.rtl.css +1 -1
  24. package/dist/css/tabler-socials.rtl.min.css +1 -1
  25. package/dist/css/tabler-themes.css +1 -1
  26. package/dist/css/tabler-themes.min.css +1 -1
  27. package/dist/css/tabler-themes.rtl.css +1 -1
  28. package/dist/css/tabler-themes.rtl.min.css +1 -1
  29. package/dist/css/tabler-vendors.css +1 -1
  30. package/dist/css/tabler-vendors.min.css +1 -1
  31. package/dist/css/tabler-vendors.rtl.css +1 -1
  32. package/dist/css/tabler-vendors.rtl.min.css +1 -1
  33. package/dist/css/tabler.css +649 -428
  34. package/dist/css/tabler.css.map +1 -1
  35. package/dist/css/tabler.min.css +2 -2
  36. package/dist/css/tabler.min.css.map +1 -1
  37. package/dist/css/tabler.rtl.css +647 -428
  38. package/dist/css/tabler.rtl.css.map +1 -1
  39. package/dist/css/tabler.rtl.min.css +2 -2
  40. package/dist/css/tabler.rtl.min.css.map +1 -1
  41. package/dist/js/tabler-theme.esm.js +1 -1
  42. package/dist/js/tabler-theme.esm.js.map +1 -1
  43. package/dist/js/tabler-theme.esm.min.js +1 -1
  44. package/dist/js/tabler-theme.js +1 -1
  45. package/dist/js/tabler-theme.js.map +1 -1
  46. package/dist/js/tabler-theme.min.js +2 -2
  47. package/dist/js/tabler-theme.min.js.map +1 -1
  48. package/dist/js/tabler.esm.js +4 -4
  49. package/dist/js/tabler.esm.js.map +1 -1
  50. package/dist/js/tabler.esm.min.js +4 -4
  51. package/dist/js/tabler.esm.min.js.map +1 -1
  52. package/dist/js/tabler.js +4 -4
  53. package/dist/js/tabler.js.map +1 -1
  54. package/dist/js/tabler.min.js +4 -4
  55. package/dist/js/tabler.min.js.map +1 -1
  56. package/dist/libs/@melloware/coloris/dist/esm/coloris.js +9 -3
  57. package/dist/libs/@melloware/coloris/dist/esm/coloris.min.js +1 -1
  58. package/dist/libs/@melloware/coloris/dist/umd/coloris.js +9 -3
  59. package/dist/libs/@melloware/coloris/dist/umd/coloris.min.js +1 -1
  60. package/dist/libs/@melloware/coloris/package.json +1 -1
  61. package/dist/libs/countup.js/README.md +2 -2
  62. package/dist/libs/countup.js/dist/countUp.d.ts +3 -2
  63. package/dist/libs/countup.js/dist/countUp.js +11 -2
  64. package/dist/libs/countup.js/dist/countUp.min.js +1 -1
  65. package/dist/libs/countup.js/dist/countUp.umd.js +1 -1
  66. package/dist/libs/countup.js/package.json +1 -1
  67. package/dist/libs/countup.js/src/countUp.spec.ts +75 -25
  68. package/dist/libs/countup.js/src/countUp.ts +13 -3
  69. package/dist/libs/fslightbox/index.js +1 -1
  70. package/dist/libs/fslightbox/package.json +1 -1
  71. package/dist/libs/fullcalendar/index.global.js +49 -20
  72. package/dist/libs/fullcalendar/index.global.min.js +2 -2
  73. package/dist/libs/fullcalendar/package.json +7 -7
  74. package/dist/libs/jsvectormap/dist/jsvectormap.cjs +240 -224
  75. package/dist/libs/jsvectormap/dist/jsvectormap.css +83 -57
  76. package/dist/libs/jsvectormap/dist/jsvectormap.esm.js +240 -224
  77. package/dist/libs/jsvectormap/dist/jsvectormap.js +240 -224
  78. package/dist/libs/jsvectormap/dist/jsvectormap.min.css +1 -1
  79. package/dist/libs/jsvectormap/dist/jsvectormap.min.js +1 -1
  80. package/dist/libs/jsvectormap/package.json +1 -1
  81. package/dist/libs/jsvectormap/src/js/components/base.js +0 -5
  82. package/dist/libs/jsvectormap/src/js/components/concerns/interactable.js +2 -7
  83. package/dist/libs/jsvectormap/src/js/components/line.js +38 -10
  84. package/dist/libs/jsvectormap/src/js/components/marker.js +72 -33
  85. package/dist/libs/jsvectormap/src/js/components/region.js +0 -5
  86. package/dist/libs/jsvectormap/src/js/components/route.js +76 -0
  87. package/dist/libs/jsvectormap/src/js/components/tooltip.js +0 -5
  88. package/dist/libs/jsvectormap/src/js/core/createLines.js +25 -24
  89. package/dist/libs/jsvectormap/src/js/core/createMarkers.js +15 -20
  90. package/dist/libs/jsvectormap/src/js/core/createRoutes.js +16 -0
  91. package/dist/libs/jsvectormap/src/js/core/repositionLines.js +22 -18
  92. package/dist/libs/jsvectormap/src/js/core/setupContainerEvents.js +2 -2
  93. package/dist/libs/jsvectormap/src/js/core/setupContainerTouchEvents.js +2 -2
  94. package/dist/libs/jsvectormap/src/js/core/setupElementEvents.js +7 -3
  95. package/dist/libs/jsvectormap/src/js/core/setupZoomButtons.js +23 -6
  96. package/dist/libs/jsvectormap/src/js/defaults/options.js +1 -0
  97. package/dist/libs/jsvectormap/src/js/eventHandler.js +0 -5
  98. package/dist/libs/jsvectormap/src/js/index.js +0 -5
  99. package/dist/libs/jsvectormap/src/js/legend.js +1 -9
  100. package/dist/libs/jsvectormap/src/js/map.js +36 -13
  101. package/dist/libs/jsvectormap/src/js/scales/ordinalScale.js +0 -5
  102. package/dist/libs/jsvectormap/src/js/series.js +0 -5
  103. package/dist/libs/jsvectormap/src/js/svg/baseElement.js +0 -5
  104. package/dist/libs/jsvectormap/src/js/svg/canvasElement.js +2 -7
  105. package/dist/libs/jsvectormap/src/js/svg/imageElement.js +0 -5
  106. package/dist/libs/jsvectormap/src/js/svg/shapeElement.js +0 -5
  107. package/dist/libs/jsvectormap/src/js/svg/textElement.js +0 -5
  108. package/dist/libs/jsvectormap/src/scss/_variables.scss +37 -0
  109. package/dist/libs/jsvectormap/src/scss/jsvectormap.scss +104 -112
  110. package/dist/libs/signature_pad/dist/signature_pad.js +133 -87
  111. package/dist/libs/signature_pad/dist/signature_pad.js.map +1 -1
  112. package/dist/libs/signature_pad/dist/signature_pad.min.js +2 -2
  113. package/dist/libs/signature_pad/dist/signature_pad.min.js.map +1 -1
  114. package/dist/libs/signature_pad/dist/signature_pad.umd.js +133 -87
  115. package/dist/libs/signature_pad/dist/signature_pad.umd.js.map +1 -1
  116. package/dist/libs/signature_pad/dist/signature_pad.umd.min.js +2 -2
  117. package/dist/libs/signature_pad/dist/signature_pad.umd.min.js.map +1 -1
  118. package/dist/libs/signature_pad/dist/types/signature_pad.d.ts +4 -1
  119. package/dist/libs/signature_pad/docs/js/signature_pad.umd.min.js +2 -2
  120. package/dist/libs/signature_pad/docs/js/signature_pad.umd.min.js.map +1 -1
  121. package/dist/libs/signature_pad/package.json +19 -19
  122. package/dist/libs/signature_pad/src/signature_pad.ts +84 -28
  123. package/package.json +9 -9
  124. package/scss/_bootstrap-components.scss +0 -1
  125. package/scss/_core.scss +1 -0
  126. package/scss/_variables.scss +78 -48
  127. package/scss/layout/_animations.scss +52 -17
  128. package/scss/layout/_navbar.scss +8 -4
  129. package/scss/ui/_breadcrumbs.scss +31 -0
  130. package/scss/ui/_buttons.scss +92 -20
  131. package/scss/ui/_cards.scss +4 -2
  132. package/scss/ui/_dropdowns.scss +1 -1
  133. package/scss/ui/_grid.scss +2 -2
  134. package/scss/ui/_lists.scss +8 -8
  135. package/scss/ui/_nav.scss +1 -1
  136. package/scss/ui/_pagination.scss +4 -4
  137. package/scss/ui/_stars.scss +0 -4
  138. package/scss/ui/_switch-icon.scss +6 -2
  139. package/scss/ui/_tables.scss +1 -1
  140. package/scss/utils/_hover.scss +47 -0
  141. package/scss/vendor/_nouislider.scss +2 -2
@@ -2,12 +2,6 @@ import { merge } from '../util'
2
2
  import Marker from '../components/marker'
3
3
 
4
4
  export default function createMarkers(markers = {}, isRecentlyCreated = false) {
5
- // Create groups for holding markers and markers labels
6
- // We're checking if `markersGroup` exists or not becuase we may add markers after the map has loaded
7
- // So we will append the futured markers to this group as well.
8
- this._markersGroup = this._markersGroup || this.canvas.createGroup('jvm-markers-group')
9
- this._markerLabelsGroup = this._markerLabelsGroup || this.canvas.createGroup('jvm-markers-labels-group')
10
-
11
5
  for (let index in markers) {
12
6
  const config = markers[index]
13
7
  const point = this.getMarkerPosition(config)
@@ -30,19 +24,20 @@ export default function createMarkers(markers = {}, isRecentlyCreated = false) {
30
24
  index = Object.keys(this._markers).length
31
25
  }
32
26
 
33
- const marker = new Marker({
34
- index,
35
- map: this,
36
- // Merge the `markerStyle` object with the marker config `style` if presented.
37
- style: merge(this.params.markerStyle, { ...config.style || {} }, true),
38
- label: this.params.labels && this.params.labels.markers,
39
- labelsGroup: this._markerLabelsGroup,
40
- cx: point.x,
41
- cy: point.y,
42
- group: this._markersGroup,
43
- marker: config,
44
- isRecentlyCreated,
45
- })
27
+ const marker = new Marker(
28
+ {
29
+ index,
30
+ map: this,
31
+ label: this.params.labels && this.params.labels.markers,
32
+ labelsGroup: this._markerLabelsGroup,
33
+ cx: point.x,
34
+ cy: point.y,
35
+ group: this._markersGroup,
36
+ config,
37
+ isRecentlyCreated,
38
+ },
39
+ merge(this.params.markerStyle, { ...(config.style || {}) }, true)
40
+ )
46
41
 
47
42
  // Check for marker duplication
48
43
  // this is useful when for example: a user clicks a button for creating marker two times
@@ -57,4 +52,4 @@ export default function createMarkers(markers = {}, isRecentlyCreated = false) {
57
52
  element: marker,
58
53
  }
59
54
  }
60
- }
55
+ }
@@ -0,0 +1,16 @@
1
+ import waypoints from "../../../../playground/data/waypoints"
2
+ import { Route } from "../components/route"
3
+
4
+ export default function createRoutes(routes) {
5
+ this._routes = {}
6
+
7
+ let index = 0
8
+ for (let route of routes) {
9
+ this._routes[route.name] = new Route({
10
+ map: this,
11
+ group: this._routesGroup,
12
+ waypoints: route.data,
13
+ index: index++,
14
+ }, {})
15
+ }
16
+ }
@@ -1,26 +1,30 @@
1
1
  export default function repositionLines() {
2
- let point1 = false, point2 = false
2
+ const curvature = this.params.lineStyle.curvature
3
3
 
4
- for (let index in this._lines) {
5
- for (let mindex in this._markers) {
6
- const marker = this._markers[mindex]
4
+ Object.values(this._lines).forEach((line) => {
5
+ const startMarker = Object.values(this._markers).find(
6
+ ({ config }) => config.name === line.getConfig().from
7
+ )
7
8
 
8
- if (marker.config.name === this._lines[index].config.from) {
9
- point1 = this.getMarkerPosition(marker.config)
10
- }
9
+ const endMarker = Object.values(this._markers).find(
10
+ ({ config }) => config.name === line.getConfig().to
11
+ )
11
12
 
12
- if (marker.config.name === this._lines[index].config.to) {
13
- point2 = this.getMarkerPosition(marker.config)
14
- }
15
- }
13
+ if (startMarker && endMarker) {
14
+ const { x: x1, y: y1 } = this.getMarkerPosition(startMarker.config)
15
+ const { x: x2, y: y2 } = this.getMarkerPosition(endMarker.config)
16
+ const curvatureOption = line._options.curvature == 0
17
+ ? 0
18
+ : line._options.curvature || curvature
19
+
20
+ const midX = (x1 + x2) / 2
21
+ const midY = (y1 + y2) / 2
22
+ const curveX = midX + curvatureOption * (y2 - y1)
23
+ const curveY = midY - curvatureOption * (x2 - x1)
16
24
 
17
- if (point1 !== false && point2 !== false) {
18
- this._lines[index].setStyle({
19
- x1: point1.x,
20
- y1: point1.y,
21
- x2: point2.x,
22
- y2: point2.y,
25
+ line.setStyle({
26
+ d: `M${x1},${y1} Q${curveX},${curveY} ${x2},${y2}`,
23
27
  })
24
28
  }
25
- }
29
+ })
26
30
  }
@@ -35,8 +35,8 @@ export default function setupContainerEvents() {
35
35
  EventHandler.on(this.container, 'wheel', event => {
36
36
  const deltaY = (((event.deltaY || -event.wheelDelta || event.detail) >> 10) || 1) * 75
37
37
  const rect = this.container.getBoundingClientRect()
38
- const offsetX = event.pageX - rect.left - window.pageXOffset
39
- const offsetY = event.pageY - rect.top - window.pageYOffset
38
+ const offsetX = event.pageX - rect.left - window.scrollX
39
+ const offsetY = event.pageY - rect.top - window.scrollY
40
40
  const zoomStep = Math.pow(1 + (map.params.zoomOnScrollSpeed / 1000), -1.5 * deltaY)
41
41
 
42
42
  if (map.tooltip) {
@@ -25,7 +25,7 @@ export default function setupContainerTouchEvents() {
25
25
  map.transX -= (touchX - touches[0].pageX) / map.scale
26
26
  map.transY -= (touchY - touches[0].pageY) / map.scale
27
27
 
28
- map._tooltip.hide()
28
+ map._tooltip?.hide()
29
29
  map._applyTransform()
30
30
 
31
31
  if (transXOld != map.transX || transYOld != map.transY) {
@@ -44,7 +44,7 @@ export default function setupContainerTouchEvents() {
44
44
 
45
45
  map._setScale(touchStartScale * scale, centerTouchX, centerTouchY)
46
46
 
47
- map._tooltip.hide()
47
+ map._tooltip?.hide()
48
48
  e.preventDefault()
49
49
  } else {
50
50
  let rect = map.container.getBoundingClientRect()
@@ -51,8 +51,10 @@ export default function setupElementEvents() {
51
51
 
52
52
  if (showTooltip) {
53
53
  map._tooltip.text(data.tooltipText)
54
- map._tooltip.show()
55
54
  map._emit(data.event, [event, map._tooltip, data.code])
55
+ if (!event.defaultPrevented) {
56
+ map._tooltip.show()
57
+ }
56
58
  }
57
59
  } else {
58
60
  data.element.hover(false)
@@ -79,7 +81,7 @@ export default function setupElementEvents() {
79
81
 
80
82
  // We're checking if regions/markers|SelectableOne option is presented
81
83
  if (map.params[`${data.type}sSelectableOne`]) {
82
- map._clearSelected(`${data.type}s`)
84
+ data.type === 'region' ? map.clearSelectedRegions() : map.clearSelectedMarkers()
83
85
  }
84
86
 
85
87
  if (data.element.isSelected) {
@@ -91,7 +93,9 @@ export default function setupElementEvents() {
91
93
  map._emit(data.event, [
92
94
  data.code,
93
95
  element.isSelected,
94
- map._getSelected(`${data.type}s`)
96
+ data.type === 'region'
97
+ ? map.getSelectedRegions()
98
+ : map.getSelectedMarkers()
95
99
  ])
96
100
  }
97
101
  })
@@ -2,11 +2,28 @@ import { createElement } from '../util'
2
2
  import EventHandler from '../eventHandler'
3
3
 
4
4
  export default function setupZoomButtons() {
5
- const zoomin = createElement('div', 'jvm-zoom-btn jvm-zoomin', '+', true)
6
- const zoomout = createElement('div', 'jvm-zoom-btn jvm-zoomout', '&#x2212', true)
5
+ const zoomInOption = this.params.zoomInButton
6
+ const zoomOutOption = this.params.zoomOutButton
7
7
 
8
- this.container.appendChild(zoomin)
9
- this.container.appendChild(zoomout)
8
+ const getZoomButton = (zoomOption) => typeof zoomOption === 'string'
9
+ ? document.querySelector(zoomOption)
10
+ : zoomOption
11
+
12
+ const zoomIn = zoomInOption
13
+ ? getZoomButton(zoomInOption)
14
+ : createElement('div', 'jvm-zoom-btn jvm-zoomin', '+', true)
15
+
16
+ const zoomOut = zoomOutOption
17
+ ? getZoomButton(zoomOutOption)
18
+ : createElement('div', 'jvm-zoom-btn jvm-zoomout', '&#x2212', true)
19
+
20
+ if (!zoomInOption) {
21
+ this.container.appendChild(zoomIn)
22
+ }
23
+
24
+ if (!zoomOutOption) {
25
+ this.container.appendChild(zoomOut)
26
+ }
10
27
 
11
28
  const handler = (zoomin = true) => {
12
29
  return () => this._setScale(
@@ -18,6 +35,6 @@ export default function setupZoomButtons() {
18
35
  )
19
36
  }
20
37
 
21
- EventHandler.on(zoomin, 'click', handler())
22
- EventHandler.on(zoomout, 'click', handler(false))
38
+ EventHandler.on(zoomIn, 'click', handler())
39
+ EventHandler.on(zoomOut, 'click', handler(false))
23
40
  }
@@ -14,6 +14,7 @@ export default {
14
14
 
15
15
  // Line options
16
16
  lineStyle: {
17
+ curvature: 0,
17
18
  stroke: '#808080',
18
19
  strokeWidth: 1,
19
20
  strokeLinecap: 'round',
@@ -1,11 +1,6 @@
1
1
  let eventRegistry = {}
2
2
  let eventUid = 1
3
3
 
4
- /**
5
- * ------------------------------------------------------------------------
6
- * Event Handler
7
- * ------------------------------------------------------------------------
8
- */
9
4
  const EventHandler = {
10
5
  on(element, event, handler, options = {}) {
11
6
  const uid = `jvm:${event}::${eventUid++}`
@@ -7,11 +7,6 @@ import Map from './map'
7
7
 
8
8
  import '../scss/jsvectormap.scss'
9
9
 
10
- /**
11
- * ------------------------------------------------------------------------
12
- * Class Definition
13
- * ------------------------------------------------------------------------
14
- */
15
10
  class jsVectorMap {
16
11
  constructor(options = {}) {
17
12
  if (!options.selector) {
@@ -1,10 +1,5 @@
1
1
  import { createElement, isImageUrl } from './util'
2
2
 
3
- /**
4
- * ------------------------------------------------------------------------
5
- * Class Definition
6
- * ------------------------------------------------------------------------
7
- */
8
3
  class Legend {
9
4
  constructor(options = {}) {
10
5
  this._options = options
@@ -27,7 +22,6 @@ class Legend {
27
22
 
28
23
  render() {
29
24
  let ticks = this._series.scale.getTicks()
30
- let inner = createElement('div', 'jvm-legend-inner')
31
25
 
32
26
  this._body.innderHTML = ''
33
27
 
@@ -36,8 +30,6 @@ class Legend {
36
30
  this._body.appendChild(legendTitle)
37
31
  }
38
32
 
39
- this._body.appendChild(inner)
40
-
41
33
  for (let i = 0; i < ticks.length; i++) {
42
34
  let tick = createElement('div', 'jvm-legend-tick',)
43
35
  let sample = createElement('div', 'jvm-legend-tick-sample')
@@ -69,7 +61,7 @@ class Legend {
69
61
  const tickText = createElement('div', 'jvm-legend-tick-text', label)
70
62
 
71
63
  tick.appendChild(tickText)
72
- inner.appendChild(tick)
64
+ this._body.appendChild(tick)
73
65
  }
74
66
  }
75
67
  }
@@ -13,11 +13,15 @@ import EventHandler from './eventHandler'
13
13
  import Tooltip from './components/tooltip'
14
14
  import DataVisualization from './dataVisualization'
15
15
 
16
- /**
17
- * ------------------------------------------------------------------------
18
- * Class Definition
19
- * ------------------------------------------------------------------------
20
- */
16
+ const JVM_PREFIX = 'jvm-'
17
+ const CONTAINER_CLASS = `${JVM_PREFIX}container`
18
+ const MARKERS_GROUP_ID = `${JVM_PREFIX}markers-group`
19
+ const MARKERS_LABELS_GROUP_ID = `${JVM_PREFIX}markers-labels-group`
20
+ const LINES_GROUP_ID = `${JVM_PREFIX}lines-group`
21
+ const SERIES_CONTAINER_CLASS = `${JVM_PREFIX}series-container`
22
+ const SERIES_CONTAINER_H_CLASS = `${SERIES_CONTAINER_CLASS} ${JVM_PREFIX}series-h`
23
+ const SERIES_CONTAINER_V_CLASS = `${SERIES_CONTAINER_CLASS} ${JVM_PREFIX}series-v`
24
+
21
25
  class Map {
22
26
  static maps = {}
23
27
  static defaults = Defaults
@@ -61,7 +65,7 @@ class Map {
61
65
  const options = this.params
62
66
 
63
67
  this.container = getElement(options.selector)
64
- this.container.classList.add('jvm-container')
68
+ this.container.classList.add(CONTAINER_CLASS)
65
69
 
66
70
  // The map canvas element
67
71
  this.canvas = new SVGCanvasElement(this.container)
@@ -75,12 +79,23 @@ class Map {
75
79
  // Update size
76
80
  this.updateSize()
77
81
 
78
- // Create lines
79
- this._createLines(options.lines || {}, options.markers || {})
82
+ // Lines group must be created before markers
83
+ // Otherwise the lines will be drawn on top of the markers.
84
+ if (options.lines) {
85
+ this._linesGroup = this.canvas.createGroup(LINES_GROUP_ID)
86
+ }
87
+
88
+ if (options.markers) {
89
+ this._markersGroup = this.canvas.createGroup(MARKERS_GROUP_ID)
90
+ this._markerLabelsGroup = this.canvas.createGroup(MARKERS_LABELS_GROUP_ID)
91
+ }
80
92
 
81
93
  // Create markers
82
94
  this._createMarkers(options.markers)
83
95
 
96
+ // Create lines
97
+ this._createLines(options.lines || {})
98
+
84
99
  // Position labels
85
100
  this._repositionLabels()
86
101
 
@@ -132,11 +147,11 @@ class Map {
132
147
  // Create series if any
133
148
  if (options.series) {
134
149
  this.container.appendChild(this.legendHorizontal = createElement(
135
- 'div', 'jvm-series-container jvm-series-h'
150
+ 'div', SERIES_CONTAINER_H_CLASS
136
151
  ))
137
152
 
138
153
  this.container.appendChild(this.legendVertical = createElement(
139
- 'div', 'jvm-series-container jvm-series-v'
154
+ 'div', SERIES_CONTAINER_V_CLASS
140
155
  ))
141
156
 
142
157
  this._createSeries()
@@ -152,7 +167,8 @@ class Map {
152
167
  this.container.style.backgroundColor = color
153
168
  }
154
169
 
155
- // Region methods
170
+ // Regions
171
+
156
172
  getSelectedRegions() {
157
173
  return this._getSelected('regions')
158
174
  }
@@ -169,7 +185,8 @@ class Map {
169
185
  this._setSelected('regions', this._normalizeRegions(regions))
170
186
  }
171
187
 
172
- // Markers methods
188
+ // Markers
189
+
173
190
  getSelectedMarkers() {
174
191
  return this._getSelected('_markers')
175
192
  }
@@ -178,6 +195,10 @@ class Map {
178
195
  this._clearSelected('_markers')
179
196
  }
180
197
 
198
+ setSelectedMarkers(markers) {
199
+ this._setSelected('_markers', markers)
200
+ }
201
+
181
202
  addMarkers(config) {
182
203
  config = Array.isArray(config) ? config : [config]
183
204
  this._createMarkers(config, true)
@@ -196,6 +217,8 @@ class Map {
196
217
  })
197
218
  }
198
219
 
220
+ // Lines
221
+
199
222
  addLine(from, to, style = {}) {
200
223
  console.warn('`addLine` method is deprecated, please use `addLines` instead.')
201
224
  this._createLines([{ from, to, style }], this._markers, true)
@@ -210,7 +233,7 @@ class Map {
210
233
 
211
234
  this._createLines(config.filter(line => {
212
235
  return !(uids.indexOf(getLineUid(line.from, line.to)) > -1)
213
- }), this._markers, true)
236
+ }), true)
214
237
  }
215
238
 
216
239
  removeLines(lines) {
@@ -1,8 +1,3 @@
1
- /**
2
- * ------------------------------------------------------------------------
3
- * Class Definition
4
- * ------------------------------------------------------------------------
5
- */
6
1
  class OrdinalScale {
7
2
  constructor(scale) {
8
3
  this._scale = scale
@@ -2,11 +2,6 @@ import { merge } from './util/index'
2
2
  import Legend from './legend'
3
3
  import OrdinalScale from './scales/ordinalScale'
4
4
 
5
- /**
6
- * ------------------------------------------------------------------------
7
- * Class Definition
8
- * ------------------------------------------------------------------------
9
- */
10
5
  class Series {
11
6
  constructor(config = {}, elements, map) {
12
7
  // Private
@@ -3,11 +3,6 @@ import {
3
3
  removeElement
4
4
  } from '../util/index'
5
5
 
6
- /**
7
- * ------------------------------------------------------------------------
8
- * Class Definition
9
- * ------------------------------------------------------------------------
10
- */
11
6
  class SVGElement {
12
7
  constructor(name, config) {
13
8
  this.node = this._createElement(name)
@@ -3,11 +3,6 @@ import SVGShapeElement from './shapeElement'
3
3
  import SVGTextElement from './textElement'
4
4
  import SVGImageElement from './imageElement'
5
5
 
6
- /**
7
- * ------------------------------------------------------------------------
8
- * Class Definition
9
- * ------------------------------------------------------------------------
10
- */
11
6
  class SVGCanvasElement extends SVGElement {
12
7
  constructor(container) {
13
8
  super('svg') // Create svg element for holding the whole map
@@ -40,12 +35,12 @@ class SVGCanvasElement extends SVGElement {
40
35
  }
41
36
 
42
37
  // Create `path` element
43
- createPath(config, style) {
38
+ createPath(config, style, group) {
44
39
  const path = new SVGShapeElement('path', config, style)
45
40
 
46
41
  path.node.setAttribute('fill-rule', 'evenodd')
47
42
 
48
- return this._add(path)
43
+ return this._add(path, group)
49
44
  }
50
45
 
51
46
  // Create `circle` element
@@ -1,10 +1,5 @@
1
1
  import SVGShapeElement from './shapeElement'
2
2
 
3
- /**
4
- * ------------------------------------------------------------------------
5
- * Class Definition
6
- * ------------------------------------------------------------------------
7
- */
8
3
  class SVGImageElement extends SVGShapeElement {
9
4
  constructor(config, style) {
10
5
  super('image', config, style)
@@ -1,11 +1,6 @@
1
1
  import { merge } from '../util/index'
2
2
  import SVGElement from './baseElement'
3
3
 
4
- /**
5
- * ------------------------------------------------------------------------
6
- * Class Definition
7
- * ------------------------------------------------------------------------
8
- */
9
4
  class SVGShapeElement extends SVGElement {
10
5
  constructor(name, config, style = {}) {
11
6
  super(name, config)
@@ -1,10 +1,5 @@
1
1
  import SVGShapeElement from './shapeElement'
2
2
 
3
- /**
4
- * ------------------------------------------------------------------------
5
- * Class Definition
6
- * ------------------------------------------------------------------------
7
- */
8
3
  class SVGTextElement extends SVGShapeElement {
9
4
  constructor(config, style) {
10
5
  super('text', config, style)
@@ -0,0 +1,37 @@
1
+ $border-color: #E5E6E7 !default;
2
+ $box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05) !default;
3
+
4
+ // Tooltip
5
+ $tooltip-font-size: 0.9rem !default;
6
+ $tooltip-bg-color: #337FFA !default;
7
+ $tooltip-color: #FFF !default;
8
+ $tooltip-padding: 3px 5px !default;
9
+ $tooltip-shadow: 1px 2px 12px rgba(0, 0, 0, .2) !default;
10
+ $tooltip-radius: 3px !default;
11
+
12
+ // Zoom buttons
13
+ $zoom-btn-bg-color: #292929 !default;
14
+ $zoom-btn-color: #FFF !default;
15
+ $zoom-btn-size: 15px !default;
16
+ $zoom-btn-radius: 3px !default;
17
+
18
+ // Series
19
+ $series-container-right: 15px !default;
20
+
21
+ // Legends
22
+ $legend-bg-color: #FFF !default;
23
+ $legend-radius: .15rem !default;
24
+ $legend-margin-left: .75rem !default;
25
+ $legend-padding: .6rem !default;
26
+
27
+ // Legend title
28
+ $legend-title-padding-bottom: .5rem !default;
29
+ $legend-title-margin-bottom: .575rem !default;
30
+
31
+ // Legend ticks
32
+ $legend-tick-margin-top: .575rem !default;
33
+ $legend-tick-sample-radius: 0 !default;
34
+ $legend-tick-sample-height: 12px !default;
35
+ $legend-tick-sample-width: 30px !default;
36
+ $legend-tick-text-font-size: 12px !default;
37
+ $legend-tick-text-margin-top: 3px !default;