quasar 1.16.3 → 1.17.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.
- package/dist/api/BottomSheet.json +2 -2
- package/dist/api/Loading.json +0 -2
- package/dist/api/Notify.json +15 -15
- package/dist/api/QAvatar.json +1 -1
- package/dist/api/QBreadcrumbsEl.json +32 -11
- package/dist/api/QBtn.json +35 -14
- package/dist/api/QBtnDropdown.json +36 -15
- package/dist/api/QBtnToggle.json +1 -1
- package/dist/api/QCarousel.json +7 -7
- package/dist/api/QCarouselSlide.json +2 -2
- package/dist/api/QChatMessage.json +1 -5
- package/dist/api/QChip.json +4 -4
- package/dist/api/QColor.json +6 -0
- package/dist/api/QDialog.json +7 -1
- package/dist/api/QExpansionItem.json +34 -13
- package/dist/api/QFab.json +34 -2
- package/dist/api/QFabAction.json +9 -1
- package/dist/api/QField.json +80 -6
- package/dist/api/QFile.json +80 -6
- package/dist/api/QImg.json +2 -2
- package/dist/api/QInnerLoading.json +32 -0
- package/dist/api/QInput.json +82 -6
- package/dist/api/QItem.json +31 -10
- package/dist/api/QOptionGroup.json +58 -1
- package/dist/api/QPagination.json +4 -4
- package/dist/api/QParallax.json +1 -1
- package/dist/api/QPopupEdit.json +14 -7
- package/dist/api/QPullToRefresh.json +1 -1
- package/dist/api/QRange.json +581 -96
- package/dist/api/QRating.json +3 -3
- package/dist/api/QRouteTab.json +32 -12
- package/dist/api/QScrollArea.json +188 -20
- package/dist/api/QSelect.json +81 -9
- package/dist/api/QSeparator.json +1 -1
- package/dist/api/QSlider.json +499 -34
- package/dist/api/QStep.json +4 -4
- package/dist/api/QStepper.json +4 -4
- package/dist/api/QTab.json +1 -1
- package/dist/api/QTable.json +4 -4
- package/dist/api/QTabs.json +9 -0
- package/dist/api/QTimelineEntry.json +2 -2
- package/dist/api/QToggle.json +1 -1
- package/dist/api/QTree.json +7 -1
- package/dist/api/QVideo.json +10 -0
- package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
- package/dist/icon-set/eva-icons.umd.min.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
- package/dist/icon-set/line-awesome.umd.min.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
- package/dist/icon-set/material-icons-round.umd.min.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
- package/dist/icon-set/material-icons.umd.min.js +1 -1
- package/dist/icon-set/mdi-v3.umd.min.js +1 -1
- package/dist/icon-set/mdi-v4.umd.min.js +1 -1
- package/dist/icon-set/mdi-v5.umd.min.js +1 -1
- package/dist/icon-set/mdi-v6.umd.min.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
- package/dist/icon-set/svg-ionicons-v6.umd.min.js +6 -0
- package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
- package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
- package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
- package/dist/icon-set/svg-themify.umd.min.js +1 -1
- package/dist/icon-set/themify.umd.min.js +1 -1
- package/dist/lang/ar.umd.min.js +2 -2
- package/dist/lang/az-latn.umd.min.js +1 -1
- package/dist/lang/bg.umd.min.js +1 -1
- package/dist/lang/ca.umd.min.js +1 -1
- package/dist/lang/cs.umd.min.js +1 -1
- package/dist/lang/da.umd.min.js +1 -1
- package/dist/lang/de.umd.min.js +1 -1
- package/dist/lang/el.umd.min.js +1 -1
- package/dist/lang/en-gb.umd.min.js +1 -1
- package/dist/lang/en-us.umd.min.js +1 -1
- package/dist/lang/eo.umd.min.js +1 -1
- package/dist/lang/es.umd.min.js +1 -1
- package/dist/lang/et.umd.min.js +1 -1
- package/dist/lang/fa-ir.umd.min.js +1 -1
- package/dist/lang/fa.umd.min.js +1 -1
- package/dist/lang/fi.umd.min.js +1 -1
- package/dist/lang/fr.umd.min.js +2 -2
- package/dist/lang/gn.umd.min.js +1 -1
- package/dist/lang/he.umd.min.js +1 -1
- package/dist/lang/hr.umd.min.js +1 -1
- package/dist/lang/hu.umd.min.js +1 -1
- package/dist/lang/id.umd.min.js +1 -1
- package/dist/lang/is.umd.min.js +1 -1
- package/dist/lang/it.umd.min.js +1 -1
- package/dist/lang/ja.umd.min.js +1 -1
- package/dist/lang/km.umd.min.js +1 -1
- package/dist/lang/ko-kr.umd.min.js +1 -1
- package/dist/lang/kur-ckb.umd.min.js +1 -1
- package/dist/lang/lu.umd.min.js +1 -1
- package/dist/lang/lv.umd.min.js +1 -1
- package/dist/lang/ml.umd.min.js +1 -1
- package/dist/lang/ms.umd.min.js +1 -1
- package/dist/lang/nb-no.umd.min.js +1 -1
- package/dist/lang/nl.umd.min.js +1 -1
- package/dist/lang/pl.umd.min.js +1 -1
- package/dist/lang/pt-br.umd.min.js +1 -1
- package/dist/lang/pt.umd.min.js +1 -1
- package/dist/lang/ro.umd.min.js +1 -1
- package/dist/lang/ru.umd.min.js +1 -1
- package/dist/lang/sk.umd.min.js +1 -1
- package/dist/lang/sl.umd.min.js +1 -1
- package/dist/lang/sr.umd.min.js +2 -2
- package/dist/lang/sv.umd.min.js +1 -1
- package/dist/lang/ta.umd.min.js +1 -1
- package/dist/lang/th.umd.min.js +1 -1
- package/dist/lang/tr.umd.min.js +1 -1
- package/dist/lang/ug.umd.min.js +2 -2
- package/dist/lang/uk.umd.min.js +1 -1
- package/dist/lang/vi.umd.min.js +1 -1
- package/dist/lang/zh-hans.umd.min.js +2 -2
- package/dist/lang/zh-hant.umd.min.js +2 -2
- package/dist/quasar.addon.css +1 -1
- package/dist/quasar.addon.rtl.css +1 -1
- package/dist/quasar.common.js +2 -2
- package/dist/quasar.css +376 -225
- package/dist/quasar.esm.js +2 -2
- package/dist/quasar.ie.polyfills.js +1 -1
- package/dist/quasar.ie.polyfills.umd.min.js +1 -1
- package/dist/quasar.min.css +1 -1
- package/dist/quasar.rtl.css +508 -301
- package/dist/quasar.rtl.min.css +1 -1
- package/dist/quasar.sass +324 -208
- package/dist/quasar.styl +324 -208
- package/dist/quasar.umd.js +3098 -1836
- package/dist/quasar.umd.min.js +2 -2
- package/dist/quasar.umd.modern.js +3057 -1817
- package/dist/quasar.umd.modern.min.js +2 -2
- package/dist/transform-asset-urls.json +20 -0
- package/dist/types/index.d.ts +421 -103
- package/dist/types/utils/scroll.d.ts +1 -0
- package/dist/vetur/quasar-attributes.json +313 -89
- package/dist/vetur/quasar-tags.json +74 -18
- package/dist/web-types/web-types.json +1289 -259
- package/icon-set/svg-ionicons-v6.js +225 -0
- package/lang/ar.js +1 -1
- package/lang/fa-ir.js +3 -1
- package/lang/fa.js +3 -1
- package/lang/fr.js +1 -1
- package/lang/index.json +1 -1
- package/lang/kur-ckb.js +2 -2
- package/lang/sr.js +4 -4
- package/lang/ug.js +48 -46
- package/lang/zh-hans.js +1 -1
- package/lang/zh-hant.js +18 -18
- package/package.json +1 -1
- package/src/api.extends.json +1 -2
- package/src/components/breadcrumbs/QBreadcrumbs.js +15 -11
- package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
- package/src/components/breadcrumbs/QBreadcrumbs.styl +0 -3
- package/src/components/breadcrumbs/QBreadcrumbsEl.js +25 -9
- package/src/components/btn/QBtn.js +3 -3
- package/src/components/btn-dropdown/QBtnDropdown.sass +2 -0
- package/src/components/btn-dropdown/QBtnDropdown.styl +2 -0
- package/src/components/carousel/QCarousel.js +6 -2
- package/src/components/carousel/QCarousel.json +9 -1
- package/src/components/carousel/QCarouselSlide.json +2 -2
- package/src/components/chat/QChatMessage.json +1 -1
- package/src/components/color/QColor.js +100 -85
- package/src/components/color/QColor.json +7 -0
- package/src/components/color/QColor.sass +14 -24
- package/src/components/color/QColor.styl +14 -24
- package/src/components/date/QDate.js +7 -1
- package/src/components/date/QDate.sass +2 -0
- package/src/components/date/QDate.styl +2 -0
- package/src/components/dialog/QDialog.js +8 -4
- package/src/components/dialog/QDialog.json +8 -1
- package/src/components/drawer/QDrawer.js +16 -15
- package/src/components/editor/QEditor.js +2 -2
- package/src/components/editor/QEditor.sass +13 -1
- package/src/components/editor/QEditor.styl +13 -1
- package/src/components/expansion-item/QExpansionItem.js +13 -11
- package/src/components/fab/QFab.js +20 -11
- package/src/components/fab/QFab.json +35 -0
- package/src/components/fab/QFabAction.js +16 -9
- package/src/components/fab/QFabAction.json +10 -0
- package/src/components/field/QField.js +28 -23
- package/src/components/field/__QField.json +72 -8
- package/src/components/file/QFile.js +12 -4
- package/src/components/file/QFile.sass +4 -3
- package/src/components/file/QFile.styl +4 -3
- package/src/components/footer/QFooter.js +1 -1
- package/src/components/form/QForm.js +1 -1
- package/src/components/header/QHeader.js +1 -1
- package/src/components/icon/QIcon.js +54 -49
- package/src/components/img/QImg.json +2 -2
- package/src/components/infinite-scroll/QInfiniteScroll.js +49 -36
- package/src/components/inner-loading/QInnerLoading.js +54 -22
- package/src/components/inner-loading/QInnerLoading.json +29 -0
- package/src/components/inner-loading/QInnerLoading.sass +3 -0
- package/src/components/inner-loading/QInnerLoading.styl +3 -0
- package/src/components/item/QItem.js +9 -15
- package/src/components/linear-progress/QLinearProgress.js +6 -2
- package/src/components/menu/QMenu.js +5 -1
- package/src/components/option-group/QOptionGroup.js +32 -22
- package/src/components/option-group/QOptionGroup.json +50 -1
- package/src/components/parallax/QParallax.js +3 -0
- package/src/components/parallax/QParallax.json +1 -1
- package/src/components/popup-edit/QPopupEdit.js +41 -16
- package/src/components/popup-edit/QPopupEdit.json +15 -8
- package/src/components/range/QRange.js +223 -278
- package/src/components/range/QRange.json +11 -122
- package/src/components/rating/QRating.js +56 -38
- package/src/components/rating/QRating.json +3 -3
- package/src/components/rating/QRating.sass +8 -6
- package/src/components/rating/QRating.styl +8 -6
- package/src/components/resize-observer/QResizeObserver.js +15 -10
- package/src/components/scroll-area/QScrollArea.js +342 -126
- package/src/components/scroll-area/QScrollArea.json +164 -20
- package/src/components/scroll-area/QScrollArea.sass +4 -0
- package/src/components/scroll-area/QScrollArea.styl +4 -0
- package/src/components/scroll-observer/QScrollObserver.js +9 -2
- package/src/components/select/QSelect.js +8 -2
- package/src/components/separator/QSeparator.js +0 -1
- package/src/components/separator/QSeparator.json +1 -1
- package/src/components/slider/QSlider.js +97 -140
- package/src/components/slider/QSlider.json +1 -122
- package/src/components/slider/QSlider.sass +205 -139
- package/src/components/slider/QSlider.styl +205 -139
- package/src/components/slider/slider-utils.js +468 -123
- package/src/components/slider/slider-utils.json +546 -0
- package/src/components/stepper/QStepper.js +1 -1
- package/src/components/stepper/QStepper.sass +25 -26
- package/src/components/stepper/QStepper.styl +25 -26
- package/src/components/table/QTable.sass +3 -0
- package/src/components/table/QTable.styl +3 -0
- package/src/components/tabs/QRouteTab.js +13 -13
- package/src/components/tabs/QRouteTab.json +0 -7
- package/src/components/tabs/QTab.js +71 -20
- package/src/components/tabs/QTabs.js +237 -52
- package/src/components/tabs/QTabs.json +8 -0
- package/src/components/tabs/QTabs.sass +6 -6
- package/src/components/tabs/QTabs.styl +6 -6
- package/src/components/time/QTime.js +6 -2
- package/src/components/timeline/QTimelineEntry.json +1 -1
- package/src/components/tree/QTree.js +10 -6
- package/src/components/tree/QTree.json +5 -0
- package/src/components/tree/QTree.sass +58 -4
- package/src/components/tree/QTree.styl +58 -4
- package/src/components/uploader/QUploaderBase.js +15 -19
- package/src/components/video/QVideo.js +4 -1
- package/src/components/video/QVideo.json +11 -0
- package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
- package/src/components/virtual-scroll/QVirtualScroll.styl +1 -0
- package/src/css/core/helpers.sass +3 -0
- package/src/css/core/helpers.styl +3 -0
- package/src/css/core/positioning.sass +5 -0
- package/src/css/core/positioning.styl +5 -0
- package/src/css/variables.sass +4 -6
- package/src/css/variables.styl +4 -6
- package/src/directives/Scroll.js +2 -2
- package/src/directives/ScrollFire.js +1 -0
- package/src/ie-compat/ie.js +13 -13
- package/src/install.js +1 -1
- package/src/lang.js +7 -4
- package/src/mixins/anchor.js +3 -13
- package/src/mixins/btn.js +30 -38
- package/src/mixins/btn.json +26 -11
- package/src/mixins/file.js +27 -5
- package/src/mixins/fullscreen.js +16 -4
- package/src/mixins/portal.js +10 -10
- package/src/mixins/router-link.js +88 -14
- package/src/mixins/router-link.json +26 -10
- package/src/mixins/validate.js +33 -15
- package/src/mixins/virtual-scroll.js +40 -42
- package/src/plugins/AppFullscreen.js +41 -16
- package/src/plugins/BottomSheet.json +1 -1
- package/src/plugins/Cookies.js +1 -1
- package/src/plugins/Loading.js +8 -0
- package/src/plugins/LoadingBar.js +9 -0
- package/src/plugins/Notify.js +351 -333
- package/src/plugins/Notify.json +10 -10
- package/src/plugins/Notify.sass +9 -3
- package/src/plugins/Notify.styl +9 -3
- package/src/utils/clone.js +53 -4
- package/src/utils/date.js +134 -69
- package/src/utils/dom.js +28 -9
- package/src/utils/extend.js +2 -2
- package/src/utils/focus-manager.js +8 -10
- package/src/utils/global-dialog.js +18 -1
- package/src/utils/is.js +2 -2
- package/src/utils/morph.js +2 -12
- package/src/utils/scroll.js +71 -35
|
@@ -1,38 +1,18 @@
|
|
|
1
|
+
import TouchPan from '../../directives/TouchPan.js'
|
|
2
|
+
|
|
3
|
+
import DarkMixin from '../../mixins/dark.js'
|
|
4
|
+
import FormMixin from '../../mixins/form.js'
|
|
5
|
+
|
|
1
6
|
import { between } from '../../utils/format.js'
|
|
2
7
|
import { position } from '../../utils/event.js'
|
|
8
|
+
import { isNumber } from '../../utils/is.js'
|
|
3
9
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import TouchPan from '../../directives/TouchPan.js'
|
|
10
|
+
const markerPrefixClass = 'q-slider__marker-labels'
|
|
11
|
+
const defaultMarkerConvertFn = v => ({ value: v })
|
|
7
12
|
|
|
8
13
|
// PGDOWN, LEFT, DOWN, PGUP, RIGHT, UP
|
|
9
14
|
export const keyCodes = [ 34, 37, 40, 33, 39, 38 ]
|
|
10
15
|
|
|
11
|
-
export function getRatio (evt, dragging, reverse, vertical) {
|
|
12
|
-
const
|
|
13
|
-
pos = position(evt),
|
|
14
|
-
val = vertical === true
|
|
15
|
-
? between((pos.top - dragging.top) / dragging.height, 0, 1)
|
|
16
|
-
: between((pos.left - dragging.left) / dragging.width, 0, 1)
|
|
17
|
-
|
|
18
|
-
return reverse === true ? 1.0 - val : val
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function getModel (ratio, min, max, step, decimals) {
|
|
22
|
-
let model = min + ratio * (max - min)
|
|
23
|
-
|
|
24
|
-
if (step > 0) {
|
|
25
|
-
const modulo = (model - min) % step
|
|
26
|
-
model += (Math.abs(modulo) >= step / 2 ? (modulo < 0 ? -1 : 1) * step : 0) - modulo
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (decimals > 0) {
|
|
30
|
-
model = parseFloat(model.toFixed(decimals))
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return between(model, min, max)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
16
|
export const SliderMixin = {
|
|
37
17
|
mixins: [ DarkMixin, FormMixin ],
|
|
38
18
|
|
|
@@ -49,30 +29,58 @@ export const SliderMixin = {
|
|
|
49
29
|
type: Number,
|
|
50
30
|
default: 100
|
|
51
31
|
},
|
|
32
|
+
innerMin: Number,
|
|
33
|
+
innerMax: Number,
|
|
34
|
+
|
|
52
35
|
step: {
|
|
53
36
|
type: Number,
|
|
54
37
|
default: 1,
|
|
55
38
|
validator: v => v >= 0
|
|
56
39
|
},
|
|
57
40
|
|
|
41
|
+
snap: Boolean,
|
|
42
|
+
|
|
43
|
+
vertical: Boolean,
|
|
44
|
+
reverse: Boolean,
|
|
45
|
+
|
|
46
|
+
hideSelection: Boolean,
|
|
47
|
+
|
|
58
48
|
color: String,
|
|
49
|
+
markerLabelsClass: String,
|
|
59
50
|
|
|
51
|
+
label: Boolean,
|
|
60
52
|
labelColor: String,
|
|
61
53
|
labelTextColor: String,
|
|
62
|
-
dense: Boolean,
|
|
63
|
-
|
|
64
|
-
label: Boolean,
|
|
65
54
|
labelAlways: Boolean,
|
|
66
|
-
|
|
67
|
-
snap: Boolean,
|
|
55
|
+
switchLabelSide: Boolean,
|
|
68
56
|
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
markers: [ Boolean, Number ],
|
|
58
|
+
markerLabels: [ Boolean, Array, Object, Function ],
|
|
59
|
+
switchMarkerLabelsSide: Boolean,
|
|
60
|
+
|
|
61
|
+
trackImg: String,
|
|
62
|
+
trackColor: String,
|
|
63
|
+
innerTrackImg: String,
|
|
64
|
+
innerTrackColor: String,
|
|
65
|
+
selectionColor: String,
|
|
66
|
+
selectionImg: String,
|
|
67
|
+
|
|
68
|
+
thumbSize: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: '20px'
|
|
71
|
+
},
|
|
72
|
+
trackSize: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: '4px'
|
|
75
|
+
},
|
|
71
76
|
|
|
72
77
|
disable: Boolean,
|
|
73
78
|
readonly: Boolean,
|
|
79
|
+
dense: Boolean,
|
|
80
|
+
|
|
74
81
|
tabindex: [ String, Number ],
|
|
75
82
|
|
|
83
|
+
thumbColor: String,
|
|
76
84
|
thumbPath: {
|
|
77
85
|
type: String,
|
|
78
86
|
default: 'M 4, 10 a 6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0'
|
|
@@ -83,7 +91,8 @@ export const SliderMixin = {
|
|
|
83
91
|
return {
|
|
84
92
|
active: false,
|
|
85
93
|
preventFocus: false,
|
|
86
|
-
focus: false
|
|
94
|
+
focus: false,
|
|
95
|
+
dragging: false
|
|
87
96
|
}
|
|
88
97
|
},
|
|
89
98
|
|
|
@@ -92,95 +101,239 @@ export const SliderMixin = {
|
|
|
92
101
|
return this.vertical === true ? '--v' : '--h'
|
|
93
102
|
},
|
|
94
103
|
|
|
95
|
-
|
|
96
|
-
return
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
(this.
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
labelSide () {
|
|
105
|
+
return '-' + (this.switchLabelSide === true ? 'switched' : 'standard')
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
isReversed () {
|
|
109
|
+
return this.vertical === true
|
|
110
|
+
? this.reverse === true
|
|
111
|
+
: this.reverse !== (this.$q.lang.rtl === true)
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
computedInnerMin () {
|
|
115
|
+
return this.__getInnerMin(this.innerMin)
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
computedInnerMax () {
|
|
119
|
+
return this.__getInnerMax(this.innerMax)
|
|
105
120
|
},
|
|
106
121
|
|
|
107
122
|
editable () {
|
|
108
|
-
return this.disable !== true && this.readonly !== true &&
|
|
123
|
+
return this.disable !== true && this.readonly !== true &&
|
|
124
|
+
this.computedInnerMin < this.computedInnerMax
|
|
109
125
|
},
|
|
110
126
|
|
|
111
|
-
|
|
112
|
-
return (String(this.step).trim('0').split('.')[1] || '').length
|
|
127
|
+
computedDecimals () {
|
|
128
|
+
return (String(this.step).trim('0').split('.')[ 1 ] || '').length
|
|
113
129
|
},
|
|
114
130
|
|
|
115
131
|
computedStep () {
|
|
116
132
|
return this.step === 0 ? 1 : this.step
|
|
117
133
|
},
|
|
118
134
|
|
|
119
|
-
|
|
120
|
-
return this.
|
|
135
|
+
computedTabindex () {
|
|
136
|
+
return this.editable === true ? this.tabindex || 0 : -1
|
|
121
137
|
},
|
|
122
138
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
139
|
+
trackLen () {
|
|
140
|
+
return this.max - this.min
|
|
141
|
+
},
|
|
126
142
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
? '2px ' + size + '%'
|
|
130
|
-
: size + '% 2px'
|
|
131
|
-
}
|
|
132
|
-
}
|
|
143
|
+
innerBarLen () {
|
|
144
|
+
return this.computedInnerMax - this.computedInnerMin
|
|
133
145
|
},
|
|
134
146
|
|
|
135
|
-
|
|
136
|
-
return this.
|
|
147
|
+
innerMinRatio () {
|
|
148
|
+
return this.__convertModelToRatio(this.computedInnerMin)
|
|
137
149
|
},
|
|
138
150
|
|
|
139
|
-
|
|
140
|
-
return this.
|
|
141
|
-
? this.reverse === true
|
|
142
|
-
: this.reverse !== (this.$q.lang.rtl === true)
|
|
151
|
+
innerMaxRatio () {
|
|
152
|
+
return this.__convertModelToRatio(this.computedInnerMax)
|
|
143
153
|
},
|
|
144
154
|
|
|
145
155
|
positionProp () {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
return this.isReversed === true ? 'right' : 'left'
|
|
156
|
+
return this.vertical === true
|
|
157
|
+
? (this.isReversed === true ? 'bottom' : 'top')
|
|
158
|
+
: (this.isReversed === true ? 'right' : 'left')
|
|
150
159
|
},
|
|
151
160
|
|
|
152
161
|
sizeProp () {
|
|
153
162
|
return this.vertical === true ? 'height' : 'width'
|
|
154
163
|
},
|
|
155
164
|
|
|
165
|
+
thicknessProp () {
|
|
166
|
+
return this.vertical === true ? 'width' : 'height'
|
|
167
|
+
},
|
|
168
|
+
|
|
156
169
|
orientation () {
|
|
157
170
|
return this.vertical === true ? 'vertical' : 'horizontal'
|
|
158
171
|
},
|
|
159
172
|
|
|
160
|
-
|
|
161
|
-
const
|
|
173
|
+
attributes () {
|
|
174
|
+
const acc = {
|
|
162
175
|
role: 'slider',
|
|
163
|
-
'aria-valuemin': this.
|
|
164
|
-
'aria-valuemax': this.
|
|
176
|
+
'aria-valuemin': this.computedInnerMin,
|
|
177
|
+
'aria-valuemax': this.computedInnerMax,
|
|
165
178
|
'aria-orientation': this.orientation,
|
|
166
179
|
'data-step': this.step
|
|
167
180
|
}
|
|
168
181
|
|
|
169
182
|
if (this.disable === true) {
|
|
170
|
-
|
|
183
|
+
acc[ 'aria-disabled' ] = 'true'
|
|
171
184
|
}
|
|
172
185
|
else if (this.readonly === true) {
|
|
173
|
-
|
|
186
|
+
acc[ 'aria-readonly' ] = 'true'
|
|
174
187
|
}
|
|
175
188
|
|
|
176
|
-
return
|
|
189
|
+
return acc
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
classes () {
|
|
193
|
+
return `q-slider q-slider${this.axis} q-slider--${this.active === true ? '' : 'in'}active inline no-wrap ` +
|
|
194
|
+
(this.vertical === true ? 'row' : 'column') +
|
|
195
|
+
(this.disable === true ? ' disabled' : ' q-slider--enabled' + (this.editable === true ? ' q-slider--editable' : '')) +
|
|
196
|
+
(this.focus === 'both' ? ' q-slider--focus' : '') +
|
|
197
|
+
(this.label || this.labelAlways === true ? ' q-slider--label' : '') +
|
|
198
|
+
(this.labelAlways === true ? ' q-slider--label-always' : '') +
|
|
199
|
+
(this.isDark === true ? ' q-slider--dark' : '') +
|
|
200
|
+
(this.dense === true ? ' q-slider--dense q-slider--dense' + this.axis : '')
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
selectionBarClass () {
|
|
204
|
+
const color = this.selectionColor || this.color
|
|
205
|
+
return 'q-slider__selection absolute' +
|
|
206
|
+
(color !== void 0 ? ` text-${color}` : '')
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
markerClass () {
|
|
210
|
+
return this.__getAxisClass('markers') + ' absolute overflow-hidden'
|
|
211
|
+
},
|
|
212
|
+
trackContainerClass () {
|
|
213
|
+
return this.__getAxisClass('track-container')
|
|
214
|
+
},
|
|
215
|
+
pinClass () {
|
|
216
|
+
return this.__getPositionClass('pin')
|
|
217
|
+
},
|
|
218
|
+
labelClass () {
|
|
219
|
+
return this.__getPositionClass('label')
|
|
220
|
+
},
|
|
221
|
+
textContainerClass () {
|
|
222
|
+
return this.__getPositionClass('text-container')
|
|
223
|
+
},
|
|
224
|
+
markerLabelsContainerClass () {
|
|
225
|
+
return this.__getPositionClass('marker-labels-container') +
|
|
226
|
+
(this.markerLabelsClass !== void 0 ? ` ${this.markerLabelsClass}` : '')
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
trackClass () {
|
|
230
|
+
return 'q-slider__track relative-position no-outline' +
|
|
231
|
+
(this.trackColor !== void 0 ? ` bg-${this.trackColor}` : '')
|
|
232
|
+
},
|
|
233
|
+
trackStyle () {
|
|
234
|
+
const acc = { [ this.thicknessProp ]: this.trackSize }
|
|
235
|
+
if (this.trackImg !== void 0) {
|
|
236
|
+
acc.backgroundImage = `url(${this.trackImg}) !important`
|
|
237
|
+
}
|
|
238
|
+
return acc
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
innerBarClass () {
|
|
242
|
+
return 'q-slider__inner absolute' +
|
|
243
|
+
(this.innerTrackColor !== void 0 ? ` bg-${this.innerTrackColor}` : '')
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
innerBarStyle () {
|
|
247
|
+
const acc = {
|
|
248
|
+
[ this.positionProp ]: `${100 * this.innerMinRatio}%`,
|
|
249
|
+
[ this.sizeProp ]: `${100 * (this.innerMaxRatio - this.innerMinRatio)}%`
|
|
250
|
+
}
|
|
251
|
+
if (this.innerTrackImg !== void 0) {
|
|
252
|
+
acc.backgroundImage = `url(${this.innerTrackImg}) !important`
|
|
253
|
+
}
|
|
254
|
+
return acc
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
markerStep () {
|
|
258
|
+
return isNumber(this.markers) === true ? this.markers : this.computedStep
|
|
259
|
+
},
|
|
260
|
+
|
|
261
|
+
markerTicks () {
|
|
262
|
+
const acc = []
|
|
263
|
+
const step = this.markerStep
|
|
264
|
+
|
|
265
|
+
let value = this.min
|
|
266
|
+
do {
|
|
267
|
+
acc.push(value)
|
|
268
|
+
value += step
|
|
269
|
+
} while (value < this.max)
|
|
270
|
+
|
|
271
|
+
acc.push(this.max)
|
|
272
|
+
return acc
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
markerLabelClass () {
|
|
276
|
+
const prefix = ` ${markerPrefixClass}${this.axis}-`
|
|
277
|
+
return markerPrefixClass +
|
|
278
|
+
`${prefix}${this.switchMarkerLabelsSide === true ? 'switched' : 'standard'}` +
|
|
279
|
+
`${prefix}${this.isReversed === true ? 'rtl' : 'ltr'}`
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
markerLabelsList () {
|
|
283
|
+
if (this.markerLabels === false) { return null }
|
|
284
|
+
|
|
285
|
+
return this.__getMarkerList(this.markerLabels).map((entry, index) => ({
|
|
286
|
+
index,
|
|
287
|
+
value: entry.value,
|
|
288
|
+
label: entry.label || entry.value,
|
|
289
|
+
classes: this.markerLabelClass +
|
|
290
|
+
(entry.classes !== void 0 ? ' ' + entry.classes : ''),
|
|
291
|
+
style: {
|
|
292
|
+
...this.__getMarkerLabelStyle(entry.value),
|
|
293
|
+
...(entry.style || {})
|
|
294
|
+
}
|
|
295
|
+
}))
|
|
296
|
+
},
|
|
297
|
+
|
|
298
|
+
markerScope () {
|
|
299
|
+
return {
|
|
300
|
+
markerList: this.markerLabelsList,
|
|
301
|
+
markerMap: this.markerLabelsMap,
|
|
302
|
+
classes: this.markerLabelClass,
|
|
303
|
+
getStyle: this.__getMarkerLabelStyle
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
|
|
307
|
+
markerStyle () {
|
|
308
|
+
if (this.innerBarLen !== 0) {
|
|
309
|
+
const size = 100 * this.markerStep / this.innerBarLen
|
|
310
|
+
|
|
311
|
+
return {
|
|
312
|
+
...this.innerBarStyle,
|
|
313
|
+
backgroundSize: this.vertical === true
|
|
314
|
+
? `2px ${size}%`
|
|
315
|
+
: `${size}% 2px`
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return null
|
|
320
|
+
},
|
|
321
|
+
|
|
322
|
+
markerLabelsMap () {
|
|
323
|
+
if (this.markerLabels === false) { return null }
|
|
324
|
+
|
|
325
|
+
const acc = {}
|
|
326
|
+
this.markerLabelsList.forEach(entry => {
|
|
327
|
+
acc[ entry.value ] = entry
|
|
328
|
+
})
|
|
329
|
+
return acc
|
|
177
330
|
},
|
|
178
331
|
|
|
179
332
|
panDirectives () {
|
|
180
333
|
return this.editable === true
|
|
181
334
|
? [{
|
|
182
335
|
name: 'touch-pan',
|
|
183
|
-
value: this.
|
|
336
|
+
value: this.__onPan,
|
|
184
337
|
modifiers: {
|
|
185
338
|
[ this.orientation ]: true,
|
|
186
339
|
prevent: true,
|
|
@@ -194,45 +347,118 @@ export const SliderMixin = {
|
|
|
194
347
|
},
|
|
195
348
|
|
|
196
349
|
methods: {
|
|
197
|
-
|
|
198
|
-
return
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
350
|
+
__getInnerMin (val) {
|
|
351
|
+
return isNaN(val) === true || this.innerMin < this.min
|
|
352
|
+
? this.min
|
|
353
|
+
: this.innerMin
|
|
354
|
+
},
|
|
355
|
+
|
|
356
|
+
__getInnerMax (val) {
|
|
357
|
+
return isNaN(val) === true || val > this.max
|
|
358
|
+
? this.max
|
|
359
|
+
: this.innerMax
|
|
360
|
+
},
|
|
361
|
+
|
|
362
|
+
__getPositionClass (name) {
|
|
363
|
+
const cls = 'q-slider__' + name
|
|
364
|
+
return `${cls} ${cls}${this.axis} ${cls}${this.axis}${this.labelSide}`
|
|
365
|
+
},
|
|
366
|
+
|
|
367
|
+
__getAxisClass (name) {
|
|
368
|
+
const cls = 'q-slider__' + name
|
|
369
|
+
return `${cls} ${cls}${this.axis}`
|
|
214
370
|
},
|
|
215
371
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
372
|
+
__convertRatioToModel (ratio) {
|
|
373
|
+
let model = this.min + ratio * (this.max - this.min)
|
|
374
|
+
|
|
375
|
+
if (this.step > 0) {
|
|
376
|
+
const modulo = (model - this.min) % this.step
|
|
377
|
+
model += (Math.abs(modulo) >= this.step / 2 ? (modulo < 0 ? -1 : 1) * this.step : 0) - modulo
|
|
219
378
|
}
|
|
220
379
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
transformOrigin: `${this.$q.lang.rtl === true ? offset : (this.$q.platform.is.ie === true ? '100%' : `calc(100% - ${offset})`)} 50%`
|
|
225
|
-
},
|
|
380
|
+
if (this.computedDecimals > 0) {
|
|
381
|
+
model = parseFloat(model.toFixed(this.computedDecimals))
|
|
382
|
+
}
|
|
226
383
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
384
|
+
return between(model, this.computedInnerMin, this.computedInnerMax)
|
|
385
|
+
},
|
|
386
|
+
|
|
387
|
+
__convertModelToRatio (model) {
|
|
388
|
+
return this.trackLen === 0
|
|
389
|
+
? 0
|
|
390
|
+
: (model - this.min) / this.trackLen
|
|
391
|
+
},
|
|
392
|
+
|
|
393
|
+
__getDraggingRatio (evt, dragging) {
|
|
394
|
+
const
|
|
395
|
+
pos = position(evt),
|
|
396
|
+
val = this.vertical === true
|
|
397
|
+
? between((pos.top - dragging.top) / dragging.height, 0, 1)
|
|
398
|
+
: between((pos.left - dragging.left) / dragging.width, 0, 1)
|
|
399
|
+
|
|
400
|
+
return between(
|
|
401
|
+
this.isReversed === true ? 1.0 - val : val,
|
|
402
|
+
this.innerMinRatio,
|
|
403
|
+
this.innerMaxRatio
|
|
404
|
+
)
|
|
405
|
+
},
|
|
406
|
+
|
|
407
|
+
__getMarkerList (def) {
|
|
408
|
+
if (def === false) { return null }
|
|
409
|
+
|
|
410
|
+
if (def === true) {
|
|
411
|
+
return this.markerTicks.map(defaultMarkerConvertFn)
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
if (typeof def === 'function') {
|
|
415
|
+
return this.markerTicks.map(value => {
|
|
416
|
+
const item = def(value)
|
|
417
|
+
return Object(item) === item ? { ...item, value } : { value, label: item }
|
|
418
|
+
})
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
const filterFn = ({ value }) => value >= this.min && value <= this.max
|
|
422
|
+
|
|
423
|
+
if (Array.isArray(def) === true) {
|
|
424
|
+
return def
|
|
425
|
+
.map(item => (Object(item) === item ? item : { value: item }))
|
|
426
|
+
.filter(filterFn)
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return Object.keys(def).map(key => {
|
|
430
|
+
const item = def[ key ]
|
|
431
|
+
const value = Number(key)
|
|
432
|
+
return Object(item) === item ? { ...item, value } : { value, label: item }
|
|
433
|
+
}).filter(filterFn)
|
|
434
|
+
},
|
|
435
|
+
|
|
436
|
+
__getMarkerLabelStyle (val) {
|
|
437
|
+
return { [ this.positionProp ]: `${100 * (val - this.min) / this.trackLen}%` }
|
|
438
|
+
},
|
|
439
|
+
|
|
440
|
+
__getMarkerLabelsContent (h) {
|
|
441
|
+
if (this.$scopedSlots[ 'marker-label-group' ] !== void 0) {
|
|
442
|
+
return this.$scopedSlots[ 'marker-label-group' ](this.markerScope)
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
const fn = this.$scopedSlots[ 'marker-label' ]
|
|
446
|
+
if (fn !== void 0) {
|
|
447
|
+
return this.markerLabelsList.map(marker => fn({
|
|
448
|
+
marker,
|
|
449
|
+
...this.markerScope
|
|
450
|
+
}))
|
|
231
451
|
}
|
|
452
|
+
|
|
453
|
+
return this.markerLabelsList.map(marker => h('div', {
|
|
454
|
+
key: marker.value,
|
|
455
|
+
style: marker.style,
|
|
456
|
+
class: marker.classes
|
|
457
|
+
}, marker.label))
|
|
232
458
|
},
|
|
233
459
|
|
|
234
|
-
|
|
235
|
-
if (event.isFinal) {
|
|
460
|
+
__onPan (event) {
|
|
461
|
+
if (event.isFinal === true) {
|
|
236
462
|
if (this.dragging !== void 0) {
|
|
237
463
|
this.__updatePosition(event.evt)
|
|
238
464
|
// only if touch, because we also have mousedown/up:
|
|
@@ -241,8 +467,9 @@ export const SliderMixin = {
|
|
|
241
467
|
this.$emit('pan', 'end')
|
|
242
468
|
}
|
|
243
469
|
this.active = false
|
|
470
|
+
this.focus = false
|
|
244
471
|
}
|
|
245
|
-
else if (event.isFirst) {
|
|
472
|
+
else if (event.isFirst === true) {
|
|
246
473
|
this.dragging = this.__getDragging(event.evt)
|
|
247
474
|
this.__updatePosition(event.evt)
|
|
248
475
|
this.__updateValue()
|
|
@@ -255,46 +482,164 @@ export const SliderMixin = {
|
|
|
255
482
|
}
|
|
256
483
|
},
|
|
257
484
|
|
|
258
|
-
|
|
485
|
+
__onBlur () {
|
|
259
486
|
this.focus = false
|
|
260
487
|
},
|
|
261
488
|
|
|
262
|
-
|
|
489
|
+
__onActivate (evt) {
|
|
263
490
|
this.__updatePosition(evt, this.__getDragging(evt))
|
|
264
491
|
this.__updateValue()
|
|
265
492
|
|
|
266
493
|
this.preventFocus = true
|
|
267
494
|
this.active = true
|
|
268
495
|
|
|
269
|
-
document.addEventListener('mouseup', this.
|
|
496
|
+
document.addEventListener('mouseup', this.__onDeactivate, true)
|
|
270
497
|
},
|
|
271
498
|
|
|
272
|
-
|
|
499
|
+
__onDeactivate () {
|
|
273
500
|
this.preventFocus = false
|
|
274
|
-
|
|
275
|
-
if (this.dragging === void 0) {
|
|
276
|
-
this.active = false
|
|
277
|
-
}
|
|
501
|
+
this.active = false
|
|
278
502
|
|
|
279
503
|
this.__updateValue(true)
|
|
280
|
-
this.
|
|
504
|
+
this.__onBlur()
|
|
281
505
|
|
|
282
|
-
document.removeEventListener('mouseup', this.
|
|
506
|
+
document.removeEventListener('mouseup', this.__onDeactivate, true)
|
|
283
507
|
},
|
|
284
508
|
|
|
285
|
-
|
|
509
|
+
__onMobileClick (evt) {
|
|
286
510
|
this.__updatePosition(evt, this.__getDragging(evt))
|
|
287
511
|
this.__updateValue(true)
|
|
288
512
|
},
|
|
289
513
|
|
|
290
|
-
|
|
514
|
+
__onKeyup (evt) {
|
|
291
515
|
if (keyCodes.includes(evt.keyCode)) {
|
|
292
516
|
this.__updateValue(true)
|
|
293
517
|
}
|
|
518
|
+
},
|
|
519
|
+
|
|
520
|
+
__getTextContainerStyle (ratio) {
|
|
521
|
+
if (this.vertical === true) { return null }
|
|
522
|
+
|
|
523
|
+
const p = this.$q.lang.rtl !== this.reverse ? 1 - ratio : ratio
|
|
524
|
+
return {
|
|
525
|
+
transform: `translateX(calc(${2 * p - 1} * ${this.thumbSize} / 2 + ${50 - 100 * p}%))`
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
|
|
529
|
+
__getThumb (h, thumb) {
|
|
530
|
+
const thumbContent = [
|
|
531
|
+
h('svg', {
|
|
532
|
+
class: 'q-slider__thumb-shape absolute-full',
|
|
533
|
+
attrs: {
|
|
534
|
+
viewBox: '0 0 20 20',
|
|
535
|
+
'aria-hidden': 'true'
|
|
536
|
+
}
|
|
537
|
+
}, [
|
|
538
|
+
h('path', {
|
|
539
|
+
attrs: { d: this.thumbPath }
|
|
540
|
+
})
|
|
541
|
+
]),
|
|
542
|
+
|
|
543
|
+
h('div', { class: 'q-slider__focus-ring fit' })
|
|
544
|
+
]
|
|
545
|
+
|
|
546
|
+
if (this.label === true || this.labelAlways === true) {
|
|
547
|
+
thumbContent.push(
|
|
548
|
+
h('div', {
|
|
549
|
+
class: this.pinClass + ' absolute fit no-pointer-events' + thumb.pinColor
|
|
550
|
+
}, [
|
|
551
|
+
h('div', {
|
|
552
|
+
class: this.labelClass,
|
|
553
|
+
style: { minWidth: this.thumbSize }
|
|
554
|
+
}, [
|
|
555
|
+
h('div', {
|
|
556
|
+
class: this.textContainerClass,
|
|
557
|
+
style: thumb.textContainerStyle
|
|
558
|
+
}, [
|
|
559
|
+
h('span', { class: thumb.textClass }, thumb.label)
|
|
560
|
+
])
|
|
561
|
+
])
|
|
562
|
+
])
|
|
563
|
+
)
|
|
564
|
+
|
|
565
|
+
if (this.name !== void 0 && this.disable !== true) {
|
|
566
|
+
this.__injectFormInput(thumbContent, 'push')
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
return h('div', {
|
|
571
|
+
class: thumb.classes,
|
|
572
|
+
style: thumb.style,
|
|
573
|
+
...thumb.nodeData
|
|
574
|
+
}, thumbContent)
|
|
575
|
+
},
|
|
576
|
+
|
|
577
|
+
__getContent (h, injectThumb) {
|
|
578
|
+
const trackContent = []
|
|
579
|
+
|
|
580
|
+
this.innerTrackColor !== 'transparent' && trackContent.push(
|
|
581
|
+
h('div', {
|
|
582
|
+
key: 'inner',
|
|
583
|
+
class: this.innerBarClass,
|
|
584
|
+
style: this.innerBarStyle
|
|
585
|
+
})
|
|
586
|
+
)
|
|
587
|
+
|
|
588
|
+
this.selectionColor !== 'transparent' && trackContent.push(
|
|
589
|
+
h('div', {
|
|
590
|
+
key: 'selection',
|
|
591
|
+
class: this.selectionBarClass,
|
|
592
|
+
style: this.selectionBarStyle
|
|
593
|
+
})
|
|
594
|
+
)
|
|
595
|
+
|
|
596
|
+
this.markers !== false && trackContent.push(
|
|
597
|
+
h('div', {
|
|
598
|
+
key: 'marker',
|
|
599
|
+
class: this.markerClass,
|
|
600
|
+
style: this.markerStyle
|
|
601
|
+
})
|
|
602
|
+
)
|
|
603
|
+
|
|
604
|
+
injectThumb(trackContent)
|
|
605
|
+
|
|
606
|
+
const content = [
|
|
607
|
+
h(
|
|
608
|
+
'div',
|
|
609
|
+
{
|
|
610
|
+
key: 'trackC',
|
|
611
|
+
class: this.trackContainerClass,
|
|
612
|
+
attrs: this.trackContainerAttrs,
|
|
613
|
+
on: this.trackContainerEvents,
|
|
614
|
+
directives: this.panDirectives
|
|
615
|
+
},
|
|
616
|
+
[
|
|
617
|
+
h('div', {
|
|
618
|
+
class: this.trackClass,
|
|
619
|
+
style: this.trackStyle
|
|
620
|
+
}, trackContent)
|
|
621
|
+
]
|
|
622
|
+
)
|
|
623
|
+
]
|
|
624
|
+
|
|
625
|
+
if (this.markerLabels !== false) {
|
|
626
|
+
const action = this.switchMarkerLabelsSide === true
|
|
627
|
+
? 'unshift'
|
|
628
|
+
: 'push'
|
|
629
|
+
|
|
630
|
+
content[ action ](
|
|
631
|
+
h('div', {
|
|
632
|
+
key: 'markerL',
|
|
633
|
+
class: this.markerLabelsContainerClass
|
|
634
|
+
}, this.__getMarkerLabelsContent(h))
|
|
635
|
+
)
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
return content
|
|
294
639
|
}
|
|
295
640
|
},
|
|
296
641
|
|
|
297
642
|
beforeDestroy () {
|
|
298
|
-
document.removeEventListener('mouseup', this.
|
|
643
|
+
document.removeEventListener('mouseup', this.__onDeactivate, true)
|
|
299
644
|
}
|
|
300
645
|
}
|