@kigi/components 1.18.0-beta.1 → 1.18.0-beta.2
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/package.json
CHANGED
|
@@ -23,6 +23,7 @@ class MbgMultiSelectController {
|
|
|
23
23
|
private stepScrollSize: any
|
|
24
24
|
private showScrollArrows: boolean
|
|
25
25
|
private onRemoveItem: Function
|
|
26
|
+
private index
|
|
26
27
|
|
|
27
28
|
constructor(public $scope, public $element, public $attrs, public $timeout) {}
|
|
28
29
|
|
|
@@ -31,6 +32,8 @@ class MbgMultiSelectController {
|
|
|
31
32
|
this.stepScrollSize = 200
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
this.index = this.index || 0
|
|
36
|
+
|
|
34
37
|
this.widthEllipsis = this.widthEllipsis || '154px'
|
|
35
38
|
this.$scope.$watch(
|
|
36
39
|
'$ctrl.ngModel',
|
|
@@ -54,7 +57,7 @@ class MbgMultiSelectController {
|
|
|
54
57
|
|
|
55
58
|
verifyScroll() {
|
|
56
59
|
this.$timeout(() => {
|
|
57
|
-
const elm = angular.element(`.mbg-multi-select-scroll`)[
|
|
60
|
+
const elm = angular.element(`.mbg-multi-select-scroll`)[this.index]
|
|
58
61
|
this.$timeout(() => {
|
|
59
62
|
ScrollAnimate.scrollLeftTo(elm, elm.scrollWidth, 350)
|
|
60
63
|
}, 100)
|
|
@@ -63,7 +66,7 @@ class MbgMultiSelectController {
|
|
|
63
66
|
|
|
64
67
|
scrollToLeft() {
|
|
65
68
|
this.$timeout(() => {
|
|
66
|
-
const elm: Element = angular.element(`.mbg-multi-select-scroll`)[
|
|
69
|
+
const elm: Element = angular.element(`.mbg-multi-select-scroll`)[this.index]
|
|
67
70
|
this.$timeout(() => {
|
|
68
71
|
const value = +elm.scrollLeft - this.stepScrollSize
|
|
69
72
|
elm.scroll({
|
|
@@ -76,8 +79,7 @@ class MbgMultiSelectController {
|
|
|
76
79
|
|
|
77
80
|
scrollToRight() {
|
|
78
81
|
this.$timeout(() => {
|
|
79
|
-
const elm = angular.element(`.mbg-multi-select-scroll`)[
|
|
80
|
-
|
|
82
|
+
const elm = angular.element(`.mbg-multi-select-scroll`)[this.index]
|
|
81
83
|
this.$timeout(() => {
|
|
82
84
|
const value = +elm.scrollLeft + this.stepScrollSize
|
|
83
85
|
elm.scroll({
|
|
@@ -287,6 +289,7 @@ const mbgMultiSelect = {
|
|
|
287
289
|
stepScrollSize: '=?',
|
|
288
290
|
showScrollArrows: '=?',
|
|
289
291
|
onRemoveItem: '&?',
|
|
292
|
+
index: '=?',
|
|
290
293
|
},
|
|
291
294
|
template,
|
|
292
295
|
controller: MbgMultiSelectController,
|