vislite 1.4.0 → 1.5.0-alpha.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/CHANGELOG +313 -307
- package/lib/BarLayout/index.es.js +347 -347
- package/lib/BarLayout/index.es.min.js +1 -1
- package/lib/Buffer/index.es.js +35 -35
- package/lib/Buffer/index.es.min.js +1 -1
- package/lib/Canvas/index.es.js +775 -774
- package/lib/Canvas/index.es.min.js +2 -2
- package/lib/Cardinal/index.es.js +90 -90
- package/lib/Cardinal/index.es.min.js +1 -1
- package/lib/Eoap/index.es.js +33 -33
- package/lib/Eoap/index.es.min.js +1 -1
- package/lib/Hermite/index.es.js +35 -35
- package/lib/Hermite/index.es.min.js +1 -1
- package/lib/MapCoordinate/index.es.js +199 -199
- package/lib/MapCoordinate/index.es.min.js +1 -1
- package/lib/Matrix4/index.es.js +124 -124
- package/lib/Matrix4/index.es.min.js +1 -1
- package/lib/Mercator/index.es.js +19 -19
- package/lib/Mercator/index.es.min.js +1 -1
- package/lib/PieLayout/index.es.js +114 -114
- package/lib/PieLayout/index.es.min.js +1 -1
- package/lib/RawCanvas/index.es.js +704 -704
- package/lib/RawCanvas/index.es.min.js +1 -1
- package/lib/SVG/index.es.js +514 -514
- package/lib/SVG/index.es.min.js +1 -1
- package/lib/Shader/index.es.js +35 -35
- package/lib/Shader/index.es.min.js +1 -1
- package/lib/Texture/index.es.js +53 -53
- package/lib/Texture/index.es.min.js +1 -1
- package/lib/TreeLayout/index.es.js +301 -301
- package/lib/TreeLayout/index.es.min.js +1 -1
- package/lib/animation/index.es.js +3 -3
- package/lib/animation/index.es.min.js +1 -1
- package/lib/assemble/index.es.js +17 -17
- package/lib/assemble/index.es.min.js +1 -1
- package/lib/getLoopColors/index.es.js +35 -35
- package/lib/getLoopColors/index.es.min.js +1 -1
- package/lib/getWebGLContext/index.es.js +62 -62
- package/lib/getWebGLContext/index.es.min.js +1 -1
- package/lib/index.umd.js +2657 -2656
- package/lib/index.umd.min.js +4 -4
- package/lib/initOption/index.es.js +6 -6
- package/lib/initOption/index.es.min.js +1 -1
- package/lib/mergeOption/index.es.js +34 -34
- package/lib/mergeOption/index.es.min.js +1 -1
- package/lib/move/index.es.js +7 -7
- package/lib/move/index.es.min.js +1 -1
- package/lib/rotate/index.es.js +7 -7
- package/lib/rotate/index.es.min.js +1 -1
- package/lib/ruler/index.es.js +137 -137
- package/lib/ruler/index.es.min.js +1 -1
- package/lib/scale/index.es.js +6 -6
- package/lib/scale/index.es.min.js +1 -1
- package/lib/throttle/index.es.js +1 -1
- package/lib/throttle/index.es.min.js +1 -1
- package/package/BarLayout/index.ts +2 -2
- package/package/PieLayout/index.ts +2 -2
- package/package/animation/index.ts +5 -5
- package/package/index.ts +84 -84
- package/package/throttle/index.ts +2 -2
- package/package.json +75 -75
- package/src/Canvas.ts +9 -4
- package/src/SVG.ts +55 -55
- package/src/common/canvas/gradient.ts +31 -31
- package/src/common/svg/default.ts +29 -29
- package/src/common/svg/gradient.ts +53 -53
- package/src/common/svg/index.ts +332 -332
- package/src/common/tree/toPlainTree.ts +135 -135
- package/src/common/webgl/texture.ts +98 -98
- package/src/layout/BarLayout.ts +248 -248
- package/src/layout/PieLayout.ts +141 -141
- package/src/layout/TreeLayout.ts +197 -197
- package/types/Bar.d.ts +91 -91
- package/types/BarConfig.d.ts +4 -4
- package/types/BarLayout.d.ts +48 -48
- package/types/BarOption.d.ts +31 -31
- package/types/CanvasOption.d.ts +5 -0
- package/types/Pie.d.ts +73 -73
- package/types/PieConfig.d.ts +26 -26
- package/types/PieLayout.d.ts +40 -40
- package/types/PieOption.d.ts +21 -21
- package/types/SVG.d.ts +247 -247
- package/types/animation.d.ts +11 -11
- package/types/index.d.ts +195 -195
- package/types/throttle.d.ts +5 -5
package/lib/ruler/index.es.js
CHANGED
|
@@ -1,143 +1,143 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ruler of VISLite JavaScript Library v1.
|
|
2
|
+
* ruler of VISLite JavaScript Library v1.5.0-alpha.0
|
|
3
3
|
* git+https://github.com/oi-contrib/VISLite.git
|
|
4
4
|
*/
|
|
5
|
-
function ruler (maxValue, minValue, num, option) {
|
|
6
|
-
if (maxValue < minValue) {
|
|
7
|
-
var temp = minValue;
|
|
8
|
-
minValue = maxValue;
|
|
9
|
-
maxValue = temp;
|
|
10
|
-
}
|
|
11
|
-
else if (maxValue == minValue) {
|
|
12
|
-
return [maxValue];
|
|
13
|
-
}
|
|
14
|
-
var times100 = (function (_value) {
|
|
15
|
-
var _times100_base = (_value < 100 && _value > -100) ? 10 : 0.1;
|
|
16
|
-
var _times100 = -1, _tiemsValue = _value;
|
|
17
|
-
while (_times100_base == 10 ?
|
|
18
|
-
(_tiemsValue >= -100 && _tiemsValue <= 100)
|
|
19
|
-
:
|
|
20
|
-
(_tiemsValue <= -100 || _tiemsValue >= 100)) {
|
|
21
|
-
_times100 += 1;
|
|
22
|
-
_tiemsValue *= _times100_base;
|
|
23
|
-
}
|
|
24
|
-
if (_times100_base == 10) {
|
|
25
|
-
return Math.pow(10, _times100);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
var temp = "0.";
|
|
29
|
-
for (var i = 1; i < _times100; i++) {
|
|
30
|
-
temp += "0";
|
|
31
|
-
}
|
|
32
|
-
return +(temp + "1");
|
|
33
|
-
}
|
|
34
|
-
})(maxValue - minValue);
|
|
35
|
-
var distance100_oral = Math.ceil((maxValue - minValue) * times100 / num);
|
|
36
|
-
var getResult = function (changValue) {
|
|
37
|
-
var distance100 = {
|
|
38
|
-
3: 2,
|
|
39
|
-
4: 5,
|
|
40
|
-
6: 5,
|
|
41
|
-
7: 5,
|
|
42
|
-
8: 10,
|
|
43
|
-
9: 10,
|
|
44
|
-
11: 10,
|
|
45
|
-
12: 10,
|
|
46
|
-
13: 15,
|
|
47
|
-
14: 15,
|
|
48
|
-
16: 15,
|
|
49
|
-
17: 15,
|
|
50
|
-
18: 20,
|
|
51
|
-
19: 20,
|
|
52
|
-
21: 20,
|
|
53
|
-
22: 20,
|
|
54
|
-
23: 25,
|
|
55
|
-
24: 25,
|
|
56
|
-
26: 25,
|
|
57
|
-
27: 25
|
|
58
|
-
}[distance100_oral + changValue] || (distance100_oral + changValue);
|
|
59
|
-
var distance = distance100 / times100;
|
|
60
|
-
var begin = Math.floor(minValue / distance) * distance;
|
|
61
|
-
var rulerArray = [];
|
|
62
|
-
rulerArray.push(begin);
|
|
63
|
-
for (var index = 1; rulerArray[rulerArray.length - 1] < maxValue; index++) {
|
|
64
|
-
rulerArray.push(begin + distance * index);
|
|
65
|
-
}
|
|
66
|
-
return rulerArray;
|
|
67
|
-
};
|
|
68
|
-
var rulerArray = getResult(0);
|
|
69
|
-
var balanceMax = function () {
|
|
70
|
-
var rulerArray_temp = [];
|
|
71
|
-
var changeDist = rulerArray[rulerArray.length - 1] - (option === null || option === void 0 ? void 0 : option.max);
|
|
72
|
-
for (var index = 0; index < rulerArray.length; index++) {
|
|
73
|
-
if (index + 1 < rulerArray.length && rulerArray[index + 1] - changeDist < minValue) ;
|
|
74
|
-
else {
|
|
75
|
-
rulerArray_temp.push(rulerArray[index] - changeDist);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return rulerArray_temp;
|
|
79
|
-
};
|
|
80
|
-
var balanceMin = function () {
|
|
81
|
-
var rulerArray_temp = [];
|
|
82
|
-
var changeDist = rulerArray[0] - (option === null || option === void 0 ? void 0 : option.min);
|
|
83
|
-
for (var index = 0; index < rulerArray.length; index++) {
|
|
84
|
-
rulerArray_temp[index] = rulerArray[index] - changeDist;
|
|
85
|
-
if (maxValue <= rulerArray_temp[index])
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
return rulerArray_temp;
|
|
89
|
-
};
|
|
90
|
-
if (option) {
|
|
91
|
-
if ('max' in option && 'min' in option && option.max >= maxValue && option.min <= minValue) {
|
|
92
|
-
var isAnswer = function () {
|
|
93
|
-
if (rulerArray[0] >= option.min && rulerArray[rulerArray.length - 1] <= option.max)
|
|
94
|
-
return true;
|
|
95
|
-
var rulerArray_max = balanceMax();
|
|
96
|
-
if (rulerArray_max[0] >= option.min && rulerArray_max[rulerArray_max.length - 1] <= option.max) {
|
|
97
|
-
rulerArray = rulerArray_max;
|
|
98
|
-
return true;
|
|
99
|
-
}
|
|
100
|
-
var rulerArray_min = balanceMin();
|
|
101
|
-
if (rulerArray_min[0] >= option.min && rulerArray_min[rulerArray_max.length - 1] <= option.max) {
|
|
102
|
-
rulerArray = rulerArray_min;
|
|
103
|
-
return true;
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
if (isAnswer())
|
|
107
|
-
return rulerArray;
|
|
108
|
-
for (var changValue = 1; changValue < 100; changValue++) {
|
|
109
|
-
rulerArray = getResult(changValue);
|
|
110
|
-
if (isAnswer())
|
|
111
|
-
return rulerArray;
|
|
112
|
-
rulerArray = getResult(-changValue);
|
|
113
|
-
if (isAnswer())
|
|
114
|
-
return rulerArray;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if ('max' in option && option.max >= maxValue) {
|
|
118
|
-
if (option.max < rulerArray[rulerArray.length - 1]) {
|
|
119
|
-
rulerArray = balanceMax();
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
else if ('min' in option && option.min <= minValue) {
|
|
123
|
-
if (option.min > rulerArray[0]) {
|
|
124
|
-
rulerArray = balanceMin();
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
for (var index = 0; index < rulerArray.length; index++) {
|
|
129
|
-
var valStr = rulerArray[index] + "";
|
|
130
|
-
if (/\./.test(valStr)) {
|
|
131
|
-
if (/9{7,}$/.test(valStr)) {
|
|
132
|
-
valStr = valStr.replace(/9{7,}$/, '');
|
|
133
|
-
rulerArray[index] = +(valStr.substring(0, valStr.length - 1) + ((+valStr[valStr.length - 1]) + 1));
|
|
134
|
-
}
|
|
135
|
-
else if (/0{7,}\d$/.test(valStr)) {
|
|
136
|
-
rulerArray[index] = +(valStr.replace(/0{7,}\d$/, ''));
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return rulerArray;
|
|
5
|
+
function ruler (maxValue, minValue, num, option) {
|
|
6
|
+
if (maxValue < minValue) {
|
|
7
|
+
var temp = minValue;
|
|
8
|
+
minValue = maxValue;
|
|
9
|
+
maxValue = temp;
|
|
10
|
+
}
|
|
11
|
+
else if (maxValue == minValue) {
|
|
12
|
+
return [maxValue];
|
|
13
|
+
}
|
|
14
|
+
var times100 = (function (_value) {
|
|
15
|
+
var _times100_base = (_value < 100 && _value > -100) ? 10 : 0.1;
|
|
16
|
+
var _times100 = -1, _tiemsValue = _value;
|
|
17
|
+
while (_times100_base == 10 ?
|
|
18
|
+
(_tiemsValue >= -100 && _tiemsValue <= 100)
|
|
19
|
+
:
|
|
20
|
+
(_tiemsValue <= -100 || _tiemsValue >= 100)) {
|
|
21
|
+
_times100 += 1;
|
|
22
|
+
_tiemsValue *= _times100_base;
|
|
23
|
+
}
|
|
24
|
+
if (_times100_base == 10) {
|
|
25
|
+
return Math.pow(10, _times100);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
var temp = "0.";
|
|
29
|
+
for (var i = 1; i < _times100; i++) {
|
|
30
|
+
temp += "0";
|
|
31
|
+
}
|
|
32
|
+
return +(temp + "1");
|
|
33
|
+
}
|
|
34
|
+
})(maxValue - minValue);
|
|
35
|
+
var distance100_oral = Math.ceil((maxValue - minValue) * times100 / num);
|
|
36
|
+
var getResult = function (changValue) {
|
|
37
|
+
var distance100 = {
|
|
38
|
+
3: 2,
|
|
39
|
+
4: 5,
|
|
40
|
+
6: 5,
|
|
41
|
+
7: 5,
|
|
42
|
+
8: 10,
|
|
43
|
+
9: 10,
|
|
44
|
+
11: 10,
|
|
45
|
+
12: 10,
|
|
46
|
+
13: 15,
|
|
47
|
+
14: 15,
|
|
48
|
+
16: 15,
|
|
49
|
+
17: 15,
|
|
50
|
+
18: 20,
|
|
51
|
+
19: 20,
|
|
52
|
+
21: 20,
|
|
53
|
+
22: 20,
|
|
54
|
+
23: 25,
|
|
55
|
+
24: 25,
|
|
56
|
+
26: 25,
|
|
57
|
+
27: 25
|
|
58
|
+
}[distance100_oral + changValue] || (distance100_oral + changValue);
|
|
59
|
+
var distance = distance100 / times100;
|
|
60
|
+
var begin = Math.floor(minValue / distance) * distance;
|
|
61
|
+
var rulerArray = [];
|
|
62
|
+
rulerArray.push(begin);
|
|
63
|
+
for (var index = 1; rulerArray[rulerArray.length - 1] < maxValue; index++) {
|
|
64
|
+
rulerArray.push(begin + distance * index);
|
|
65
|
+
}
|
|
66
|
+
return rulerArray;
|
|
67
|
+
};
|
|
68
|
+
var rulerArray = getResult(0);
|
|
69
|
+
var balanceMax = function () {
|
|
70
|
+
var rulerArray_temp = [];
|
|
71
|
+
var changeDist = rulerArray[rulerArray.length - 1] - (option === null || option === void 0 ? void 0 : option.max);
|
|
72
|
+
for (var index = 0; index < rulerArray.length; index++) {
|
|
73
|
+
if (index + 1 < rulerArray.length && rulerArray[index + 1] - changeDist < minValue) ;
|
|
74
|
+
else {
|
|
75
|
+
rulerArray_temp.push(rulerArray[index] - changeDist);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return rulerArray_temp;
|
|
79
|
+
};
|
|
80
|
+
var balanceMin = function () {
|
|
81
|
+
var rulerArray_temp = [];
|
|
82
|
+
var changeDist = rulerArray[0] - (option === null || option === void 0 ? void 0 : option.min);
|
|
83
|
+
for (var index = 0; index < rulerArray.length; index++) {
|
|
84
|
+
rulerArray_temp[index] = rulerArray[index] - changeDist;
|
|
85
|
+
if (maxValue <= rulerArray_temp[index])
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
return rulerArray_temp;
|
|
89
|
+
};
|
|
90
|
+
if (option) {
|
|
91
|
+
if ('max' in option && 'min' in option && option.max >= maxValue && option.min <= minValue) {
|
|
92
|
+
var isAnswer = function () {
|
|
93
|
+
if (rulerArray[0] >= option.min && rulerArray[rulerArray.length - 1] <= option.max)
|
|
94
|
+
return true;
|
|
95
|
+
var rulerArray_max = balanceMax();
|
|
96
|
+
if (rulerArray_max[0] >= option.min && rulerArray_max[rulerArray_max.length - 1] <= option.max) {
|
|
97
|
+
rulerArray = rulerArray_max;
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
var rulerArray_min = balanceMin();
|
|
101
|
+
if (rulerArray_min[0] >= option.min && rulerArray_min[rulerArray_max.length - 1] <= option.max) {
|
|
102
|
+
rulerArray = rulerArray_min;
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
if (isAnswer())
|
|
107
|
+
return rulerArray;
|
|
108
|
+
for (var changValue = 1; changValue < 100; changValue++) {
|
|
109
|
+
rulerArray = getResult(changValue);
|
|
110
|
+
if (isAnswer())
|
|
111
|
+
return rulerArray;
|
|
112
|
+
rulerArray = getResult(-changValue);
|
|
113
|
+
if (isAnswer())
|
|
114
|
+
return rulerArray;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if ('max' in option && option.max >= maxValue) {
|
|
118
|
+
if (option.max < rulerArray[rulerArray.length - 1]) {
|
|
119
|
+
rulerArray = balanceMax();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else if ('min' in option && option.min <= minValue) {
|
|
123
|
+
if (option.min > rulerArray[0]) {
|
|
124
|
+
rulerArray = balanceMin();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
for (var index = 0; index < rulerArray.length; index++) {
|
|
129
|
+
var valStr = rulerArray[index] + "";
|
|
130
|
+
if (/\./.test(valStr)) {
|
|
131
|
+
if (/9{7,}$/.test(valStr)) {
|
|
132
|
+
valStr = valStr.replace(/9{7,}$/, '');
|
|
133
|
+
rulerArray[index] = +(valStr.substring(0, valStr.length - 1) + ((+valStr[valStr.length - 1]) + 1));
|
|
134
|
+
}
|
|
135
|
+
else if (/0{7,}\d$/.test(valStr)) {
|
|
136
|
+
rulerArray[index] = +(valStr.replace(/0{7,}\d$/, ''));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return rulerArray;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
export { ruler as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ruler of VISLite JavaScript Library v1.
|
|
2
|
+
* ruler of VISLite JavaScript Library v1.5.0-alpha.0
|
|
3
3
|
* git+https://github.com/oi-contrib/VISLite.git
|
|
4
4
|
*/
|
|
5
5
|
function n(n,r,t,e){if(n<r){var i=r;r=n,n=i}else if(n==r)return[n];var a=function(n){for(var r=n<100&&n>-100?10:.1,t=-1,e=n;10==r?e>=-100&&e<=100:e<=-100||e>=100;)t+=1,e*=r;if(10==r)return Math.pow(10,t);for(var i="0.",a=1;a<t;a++)i+="0";return+(i+"1")}(n-r),u=Math.ceil((n-r)*a/t),f=function(t){var e=({3:2,4:5,6:5,7:5,8:10,9:10,11:10,12:10,13:15,14:15,16:15,17:15,18:20,19:20,21:20,22:20,23:25,24:25,26:25,27:25}[u+t]||u+t)/a,i=Math.floor(r/e)*e,f=[];f.push(i);for(var l=1;f[f.length-1]<n;l++)f.push(i+e*l);return f},l=f(0),o=function(){for(var n=[],t=l[l.length-1]-(null==e?void 0:e.max),i=0;i<l.length;i++)i+1<l.length&&l[i+1]-t<r||n.push(l[i]-t);return n},h=function(){for(var r=[],t=l[0]-(null==e?void 0:e.min),i=0;i<l.length&&(r[i]=l[i]-t,!(n<=r[i]));i++);return r};if(e){if("max"in e&&"min"in e&&e.max>=n&&e.min<=r){var m=function(){if(l[0]>=e.min&&l[l.length-1]<=e.max)return!0;var n=o();if(n[0]>=e.min&&n[n.length-1]<=e.max)return l=n,!0;var r=h();return r[0]>=e.min&&r[n.length-1]<=e.max?(l=r,!0):void 0};if(m())return l;for(var v=1;v<100;v++){if(l=f(v),m())return l;if(l=f(-v),m())return l}}"max"in e&&e.max>=n?e.max<l[l.length-1]&&(l=o()):"min"in e&&e.min<=r&&e.min>l[0]&&(l=h())}for(var g=0;g<l.length;g++){var s=l[g]+"";/\./.test(s)&&(/9{7,}$/.test(s)?(s=s.replace(/9{7,}$/,""),l[g]=+(s.substring(0,s.length-1)+(+s[s.length-1]+1))):/0{7,}\d$/.test(s)&&(l[g]=+s.replace(/0{7,}\d$/,"")))}return l}export{n as default};
|
package/lib/scale/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* scale of VISLite JavaScript Library v1.
|
|
2
|
+
* scale of VISLite JavaScript Library v1.5.0-alpha.0
|
|
3
3
|
* git+https://github.com/oi-contrib/VISLite.git
|
|
4
4
|
*/
|
|
5
|
-
function scale (cx, cy, times, x, y) {
|
|
6
|
-
return [
|
|
7
|
-
times * (x - cx) + cx,
|
|
8
|
-
times * (y - cy) + cy
|
|
9
|
-
];
|
|
5
|
+
function scale (cx, cy, times, x, y) {
|
|
6
|
+
return [
|
|
7
|
+
times * (x - cx) + cx,
|
|
8
|
+
times * (y - cy) + cy
|
|
9
|
+
];
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export { scale as default };
|
package/lib/throttle/index.es.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import BarLayout from "../../src/layout/BarLayout"
|
|
2
|
-
|
|
1
|
+
import BarLayout from "../../src/layout/BarLayout"
|
|
2
|
+
|
|
3
3
|
export default BarLayout
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import PieLayout from "../../src/layout/PieLayout"
|
|
2
|
-
|
|
1
|
+
import PieLayout from "../../src/layout/PieLayout"
|
|
2
|
+
|
|
3
3
|
export default PieLayout
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { animationFun } from "oipage/web/animation/index"
|
|
2
|
-
import { animation } from "oipage/web/animation/index"
|
|
3
|
-
|
|
4
|
-
export default function (doback: animationFun, duration?: number, callback?: animationFun) {
|
|
5
|
-
return animation(doback, duration || 400, callback || function () { }).stop
|
|
1
|
+
import type { animationFun } from "oipage/web/animation/index"
|
|
2
|
+
import { animation } from "oipage/web/animation/index"
|
|
3
|
+
|
|
4
|
+
export default function (doback: animationFun, duration?: number, callback?: animationFun) {
|
|
5
|
+
return animation(doback, duration || 400, callback || function () { }).stop
|
|
6
6
|
}
|
package/package/index.ts
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import Cardinal from "./Cardinal/index"
|
|
2
|
-
import Hermite from "./Hermite/index"
|
|
3
|
-
|
|
4
|
-
import Matrix4 from "./Matrix4/index"
|
|
5
|
-
import rotate from "./rotate/index"
|
|
6
|
-
import move from "./move/index"
|
|
7
|
-
import scale from "./scale/index"
|
|
8
|
-
|
|
9
|
-
import getLoopColors from "./getLoopColors/index"
|
|
10
|
-
import animation from "./animation/index"
|
|
11
|
-
import ruler from "./ruler/index"
|
|
12
|
-
|
|
13
|
-
import SVG from "./SVG/index"
|
|
14
|
-
import Canvas from "./Canvas/index"
|
|
15
|
-
import RawCanvas from "../src/common/canvas/index"
|
|
16
|
-
|
|
17
|
-
import getWebGLContext from "./getWebGLContext/index"
|
|
18
|
-
import Shader from "./Shader/index"
|
|
19
|
-
import Texture from "./Texture/index"
|
|
20
|
-
import Buffer from "./Buffer/index"
|
|
21
|
-
|
|
22
|
-
import Eoap from "./Eoap/index"
|
|
23
|
-
import Mercator from "./Mercator/index"
|
|
24
|
-
|
|
25
|
-
import throttle from "./throttle/index"
|
|
26
|
-
|
|
27
|
-
import MapCoordinate from "./MapCoordinate/index"
|
|
28
|
-
|
|
29
|
-
import TreeLayout from "./TreeLayout/index"
|
|
30
|
-
import PieLayout from "./PieLayout/index"
|
|
31
|
-
import BarLayout from "./BarLayout/index"
|
|
32
|
-
|
|
33
|
-
import initOption from "./initOption/index"
|
|
34
|
-
import mergeOption from "./mergeOption/index"
|
|
35
|
-
|
|
36
|
-
import assemble from "./assemble/index"
|
|
37
|
-
|
|
38
|
-
export default {
|
|
39
|
-
|
|
40
|
-
// 插值
|
|
41
|
-
Cardinal,
|
|
42
|
-
Hermite,
|
|
43
|
-
|
|
44
|
-
// 变换
|
|
45
|
-
Matrix4,
|
|
46
|
-
rotate,
|
|
47
|
-
move,
|
|
48
|
-
scale,
|
|
49
|
-
|
|
50
|
-
// 工具
|
|
51
|
-
getLoopColors,
|
|
52
|
-
animation,
|
|
53
|
-
ruler,
|
|
54
|
-
|
|
55
|
-
// 画笔
|
|
56
|
-
SVG,
|
|
57
|
-
Canvas,
|
|
58
|
-
RawCanvas,
|
|
59
|
-
|
|
60
|
-
// WebGL
|
|
61
|
-
getWebGLContext,
|
|
62
|
-
Shader,
|
|
63
|
-
Texture,
|
|
64
|
-
Buffer,
|
|
65
|
-
|
|
66
|
-
// 投影
|
|
67
|
-
Eoap,
|
|
68
|
-
Mercator,
|
|
69
|
-
|
|
70
|
-
// 辅助
|
|
71
|
-
throttle,
|
|
72
|
-
assemble,
|
|
73
|
-
|
|
74
|
-
// 坐标系
|
|
75
|
-
MapCoordinate,
|
|
76
|
-
|
|
77
|
-
// 布局
|
|
78
|
-
TreeLayout,
|
|
79
|
-
PieLayout,
|
|
80
|
-
BarLayout,
|
|
81
|
-
|
|
82
|
-
// 配置项
|
|
83
|
-
initOption,
|
|
84
|
-
mergeOption
|
|
1
|
+
import Cardinal from "./Cardinal/index"
|
|
2
|
+
import Hermite from "./Hermite/index"
|
|
3
|
+
|
|
4
|
+
import Matrix4 from "./Matrix4/index"
|
|
5
|
+
import rotate from "./rotate/index"
|
|
6
|
+
import move from "./move/index"
|
|
7
|
+
import scale from "./scale/index"
|
|
8
|
+
|
|
9
|
+
import getLoopColors from "./getLoopColors/index"
|
|
10
|
+
import animation from "./animation/index"
|
|
11
|
+
import ruler from "./ruler/index"
|
|
12
|
+
|
|
13
|
+
import SVG from "./SVG/index"
|
|
14
|
+
import Canvas from "./Canvas/index"
|
|
15
|
+
import RawCanvas from "../src/common/canvas/index"
|
|
16
|
+
|
|
17
|
+
import getWebGLContext from "./getWebGLContext/index"
|
|
18
|
+
import Shader from "./Shader/index"
|
|
19
|
+
import Texture from "./Texture/index"
|
|
20
|
+
import Buffer from "./Buffer/index"
|
|
21
|
+
|
|
22
|
+
import Eoap from "./Eoap/index"
|
|
23
|
+
import Mercator from "./Mercator/index"
|
|
24
|
+
|
|
25
|
+
import throttle from "./throttle/index"
|
|
26
|
+
|
|
27
|
+
import MapCoordinate from "./MapCoordinate/index"
|
|
28
|
+
|
|
29
|
+
import TreeLayout from "./TreeLayout/index"
|
|
30
|
+
import PieLayout from "./PieLayout/index"
|
|
31
|
+
import BarLayout from "./BarLayout/index"
|
|
32
|
+
|
|
33
|
+
import initOption from "./initOption/index"
|
|
34
|
+
import mergeOption from "./mergeOption/index"
|
|
35
|
+
|
|
36
|
+
import assemble from "./assemble/index"
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
|
|
40
|
+
// 插值
|
|
41
|
+
Cardinal,
|
|
42
|
+
Hermite,
|
|
43
|
+
|
|
44
|
+
// 变换
|
|
45
|
+
Matrix4,
|
|
46
|
+
rotate,
|
|
47
|
+
move,
|
|
48
|
+
scale,
|
|
49
|
+
|
|
50
|
+
// 工具
|
|
51
|
+
getLoopColors,
|
|
52
|
+
animation,
|
|
53
|
+
ruler,
|
|
54
|
+
|
|
55
|
+
// 画笔
|
|
56
|
+
SVG,
|
|
57
|
+
Canvas,
|
|
58
|
+
RawCanvas,
|
|
59
|
+
|
|
60
|
+
// WebGL
|
|
61
|
+
getWebGLContext,
|
|
62
|
+
Shader,
|
|
63
|
+
Texture,
|
|
64
|
+
Buffer,
|
|
65
|
+
|
|
66
|
+
// 投影
|
|
67
|
+
Eoap,
|
|
68
|
+
Mercator,
|
|
69
|
+
|
|
70
|
+
// 辅助
|
|
71
|
+
throttle,
|
|
72
|
+
assemble,
|
|
73
|
+
|
|
74
|
+
// 坐标系
|
|
75
|
+
MapCoordinate,
|
|
76
|
+
|
|
77
|
+
// 布局
|
|
78
|
+
TreeLayout,
|
|
79
|
+
PieLayout,
|
|
80
|
+
BarLayout,
|
|
81
|
+
|
|
82
|
+
// 配置项
|
|
83
|
+
initOption,
|
|
84
|
+
mergeOption
|
|
85
85
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { throttle } from "oipage/web/throttle/index"
|
|
2
|
-
|
|
1
|
+
import { throttle } from "oipage/web/throttle/index"
|
|
2
|
+
|
|
3
3
|
export default throttle
|