@visactor/vrender-components 0.17.5-alpha.0 → 0.17.5
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/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/label/base.js +1 -1
- package/cjs/label/base.js.map +1 -1
- package/cjs/poptip/index.d.ts +2 -1
- package/cjs/poptip/index.js +9 -5
- package/cjs/poptip/index.js.map +1 -1
- package/cjs/poptip/module.d.ts +3 -0
- package/cjs/poptip/module.js +21 -0
- package/cjs/poptip/module.js.map +1 -0
- package/cjs/poptip/poptip-plugin.js +1 -1
- package/cjs/poptip/poptip-plugin.js.map +1 -1
- package/cjs/poptip/poptip.js.map +1 -1
- package/cjs/poptip/register.d.ts +0 -3
- package/cjs/poptip/register.js +3 -15
- package/cjs/poptip/register.js.map +1 -1
- package/cjs/scrollbar/module.d.ts +3 -0
- package/cjs/scrollbar/module.js +17 -0
- package/cjs/scrollbar/module.js.map +1 -0
- package/cjs/scrollbar/register.d.ts +0 -3
- package/cjs/scrollbar/register.js +3 -10
- package/cjs/scrollbar/register.js.map +1 -1
- package/cjs/scrollbar/scrollbar.js +4 -1
- package/cjs/scrollbar/scrollbar.js.map +1 -1
- package/cjs/util/label-smartInvert.js +5 -11
- package/cjs/util/label-smartInvert.js.map +1 -1
- package/dist/index.js +329 -538
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/label/base.js +1 -1
- package/es/label/base.js.map +1 -1
- package/es/poptip/index.d.ts +2 -1
- package/es/poptip/index.js +3 -1
- package/es/poptip/index.js.map +1 -1
- package/es/poptip/module.d.ts +3 -0
- package/es/poptip/module.js +17 -0
- package/es/poptip/module.js.map +1 -0
- package/es/poptip/poptip-plugin.js +1 -1
- package/es/poptip/poptip-plugin.js.map +1 -1
- package/es/poptip/poptip.js.map +1 -1
- package/es/poptip/register.d.ts +0 -3
- package/es/poptip/register.js +0 -17
- package/es/poptip/register.js.map +1 -1
- package/es/scrollbar/module.d.ts +3 -0
- package/es/scrollbar/module.js +12 -0
- package/es/scrollbar/module.js.map +1 -0
- package/es/scrollbar/register.d.ts +0 -3
- package/es/scrollbar/register.js +0 -12
- package/es/scrollbar/register.js.map +1 -1
- package/es/scrollbar/scrollbar.js +4 -1
- package/es/scrollbar/scrollbar.js.map +1 -1
- package/es/util/label-smartInvert.js +3 -9
- package/es/util/label-smartInvert.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -3167,7 +3167,8 @@
|
|
|
3167
3167
|
whiteSpace: "no-wrap",
|
|
3168
3168
|
heightLimit: 1 / 0,
|
|
3169
3169
|
lineClamp: 1 / 0,
|
|
3170
|
-
suffixPosition: "end"
|
|
3170
|
+
suffixPosition: "end",
|
|
3171
|
+
disableAutoClipedPoptip: void 0
|
|
3171
3172
|
};
|
|
3172
3173
|
var DefaultPickStyle = {
|
|
3173
3174
|
pickStrokeBuffer: 0
|
|
@@ -5734,7 +5735,6 @@
|
|
|
5734
5735
|
Direction[Direction.LEFT_TO_RIGHT = 0] = "LEFT_TO_RIGHT", Direction[Direction.RIGHT_TO_LEFT = 1] = "RIGHT_TO_LEFT", Direction[Direction.TOP_TO_BOTTOM = 2] = "TOP_TO_BOTTOM", Direction[Direction.BOTTOM_TO_TOP = 3] = "BOTTOM_TO_TOP", Direction[Direction.STROKE = 4] = "STROKE";
|
|
5735
5736
|
}(Direction || (Direction = {}));
|
|
5736
5737
|
|
|
5737
|
-
var Color$1 = vutils.ColorUtil.Color;
|
|
5738
5738
|
var ColorType;
|
|
5739
5739
|
!function (ColorType) {
|
|
5740
5740
|
ColorType[ColorType.Color255 = 0] = "Color255", ColorType[ColorType.Color1 = 1] = "Color1";
|
|
@@ -5751,7 +5751,7 @@
|
|
|
5751
5751
|
if (size === ColorType.Color1) {
|
|
5752
5752
|
var _color = ColorStore.store1[str];
|
|
5753
5753
|
if (_color) return arr[0] = _color[0], arr[1] = _color[1], arr[2] = _color[2], arr[3] = _color[3], arr;
|
|
5754
|
-
var _c = Color
|
|
5754
|
+
var _c = vutils.Color.parseColorString(str);
|
|
5755
5755
|
if (_c) {
|
|
5756
5756
|
var data = [_c.r / 255, _c.g / 255, _c.b / 255, _c.opacity];
|
|
5757
5757
|
ColorStore.store1[str] = data, ColorStore.store255[str] = [_c.r, _c.g, _c.b, _c.opacity], arr[0] = data[0], arr[1] = data[1], arr[2] = data[2], arr[3] = data[3];
|
|
@@ -5760,7 +5760,7 @@
|
|
|
5760
5760
|
}
|
|
5761
5761
|
var color = ColorStore.store255[str];
|
|
5762
5762
|
if (color) return arr[0] = color[0], arr[1] = color[1], arr[2] = color[2], arr[3] = color[3], arr;
|
|
5763
|
-
var c = Color
|
|
5763
|
+
var c = vutils.Color.parseColorString(str);
|
|
5764
5764
|
return c && (ColorStore.store1[str] = [c.r / 255, c.g / 255, c.b / 255, c.opacity], ColorStore.store255[str] = [c.r, c.g, c.b, c.opacity], arr[0] = c.r, arr[1] = c.g, arr[2] = c.b, arr[3] = c.opacity), arr;
|
|
5765
5765
|
}
|
|
5766
5766
|
}, {
|
|
@@ -8245,7 +8245,7 @@
|
|
|
8245
8245
|
var _a;
|
|
8246
8246
|
var attribute = this.attribute,
|
|
8247
8247
|
textTheme = getTheme(this).text;
|
|
8248
|
-
if (
|
|
8248
|
+
if (this.isMultiLine) return;
|
|
8249
8249
|
var _attribute$maxLineWid = attribute.maxLineWidth,
|
|
8250
8250
|
maxLineWidth = _attribute$maxLineWid === void 0 ? textTheme.maxLineWidth : _attribute$maxLineWid;
|
|
8251
8251
|
return Number.isFinite(maxLineWidth) ? (this.tryUpdateAABBBounds(), this.cache.clipedText) : (null !== (_a = attribute.text) && void 0 !== _a ? _a : textTheme.text).toString();
|
|
@@ -8253,14 +8253,14 @@
|
|
|
8253
8253
|
}, {
|
|
8254
8254
|
key: "clipedWidth",
|
|
8255
8255
|
get: function get() {
|
|
8256
|
-
if (!
|
|
8256
|
+
if (!this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
|
|
8257
8257
|
}
|
|
8258
8258
|
}, {
|
|
8259
8259
|
key: "cliped",
|
|
8260
8260
|
get: function get() {
|
|
8261
8261
|
var textTheme = getTheme(this).text,
|
|
8262
8262
|
attribute = this.attribute;
|
|
8263
|
-
if (
|
|
8263
|
+
if (this.isMultiLine) return;
|
|
8264
8264
|
var _attribute$maxLineWid2 = attribute.maxLineWidth,
|
|
8265
8265
|
maxLineWidth = _attribute$maxLineWid2 === void 0 ? textTheme.maxLineWidth : _attribute$maxLineWid2;
|
|
8266
8266
|
return !!Number.isFinite(maxLineWidth) && (this.tryUpdateAABBBounds(), this.clipedText !== attribute.text.toString());
|
|
@@ -8268,7 +8268,12 @@
|
|
|
8268
8268
|
}, {
|
|
8269
8269
|
key: "multilineLayout",
|
|
8270
8270
|
get: function get() {
|
|
8271
|
-
if (
|
|
8271
|
+
if (this.isMultiLine) return this.tryUpdateAABBBounds(), this.cache.layoutData;
|
|
8272
|
+
}
|
|
8273
|
+
}, {
|
|
8274
|
+
key: "isMultiLine",
|
|
8275
|
+
get: function get() {
|
|
8276
|
+
return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
|
|
8272
8277
|
}
|
|
8273
8278
|
}, {
|
|
8274
8279
|
key: "isValid",
|
|
@@ -14410,9 +14415,9 @@
|
|
|
14410
14415
|
var _this2 = this;
|
|
14411
14416
|
var _a, _b, _c;
|
|
14412
14417
|
var textAttribute = getTheme(text, null == params ? void 0 : params.theme).text,
|
|
14413
|
-
_text$attribute = text.attribute
|
|
14414
|
-
|
|
14415
|
-
_text$attribute$under = _text$attribute.underline,
|
|
14418
|
+
_text$attribute = text.attribute;
|
|
14419
|
+
_text$attribute.text;
|
|
14420
|
+
var _text$attribute$under = _text$attribute.underline,
|
|
14416
14421
|
underline = _text$attribute$under === void 0 ? textAttribute.underline : _text$attribute$under,
|
|
14417
14422
|
_text$attribute$lineT = _text$attribute.lineThrough,
|
|
14418
14423
|
lineThrough = _text$attribute$lineT === void 0 ? textAttribute.lineThrough : _text$attribute$lineT,
|
|
@@ -14420,7 +14425,9 @@
|
|
|
14420
14425
|
keepDirIn3d = _text$attribute$keepD === void 0 ? textAttribute.keepDirIn3d : _text$attribute$keepD,
|
|
14421
14426
|
_text$attribute$direc = _text$attribute.direction,
|
|
14422
14427
|
direction = _text$attribute$direc === void 0 ? textAttribute.direction : _text$attribute$direc,
|
|
14423
|
-
_text$attribute$
|
|
14428
|
+
_text$attribute$white = _text$attribute.whiteSpace;
|
|
14429
|
+
_text$attribute$white === void 0 ? textAttribute.whiteSpace : _text$attribute$white;
|
|
14430
|
+
var _text$attribute$fontS = _text$attribute.fontSize,
|
|
14424
14431
|
fontSize = _text$attribute$fontS === void 0 ? textAttribute.fontSize : _text$attribute$fontS,
|
|
14425
14432
|
_text$attribute$verti = _text$attribute.verticalMode,
|
|
14426
14433
|
verticalMode = _text$attribute$verti === void 0 ? textAttribute.verticalMode : _text$attribute$verti,
|
|
@@ -14457,7 +14464,7 @@
|
|
|
14457
14464
|
}
|
|
14458
14465
|
doStroke && (strokeCb ? strokeCb(context, text.attribute, textAttribute) : sVisible && (context.setStrokeStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.strokeText(t, _x, _y, z))), doFill && (fillCb ? fillCb(context, text.attribute, textAttribute) : fVisible && (context.setCommonStyle(text, text.attribute, originX - x, originY - y, textAttribute), context.fillText(t, _x, _y, z), _this2.drawUnderLine(underline, lineThrough, text, _x, _y, z, textAttribute, context))), direction && (context.highPerformanceRestore(), context.setTransformForCurrent());
|
|
14459
14466
|
};
|
|
14460
|
-
if (
|
|
14467
|
+
if (text.isMultiLine) {
|
|
14461
14468
|
if (context.setTextStyleWithoutAlignBaseline(text.attribute, textAttribute, z), "horizontal" === direction) {
|
|
14462
14469
|
var multilineLayout = text.multilineLayout;
|
|
14463
14470
|
if (!multilineLayout) return void context.highPerformanceRestore();
|
|
@@ -15095,6 +15102,11 @@
|
|
|
15095
15102
|
value: function register(plugin) {
|
|
15096
15103
|
"onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.push(plugin) : "onRegister" === plugin.activeEvent && (this.onRegisterPlugin.push(plugin), plugin.activate(this));
|
|
15097
15104
|
}
|
|
15105
|
+
}, {
|
|
15106
|
+
key: "unRegister",
|
|
15107
|
+
value: function unRegister(plugin) {
|
|
15108
|
+
"onStartupFinished" === plugin.activeEvent ? this.onStartupFinishedPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1) : "onRegister" === plugin.activeEvent && this.onRegisterPlugin.splice(this.onStartupFinishedPlugin.indexOf(plugin), 1), plugin.deactivate(this);
|
|
15109
|
+
}
|
|
15098
15110
|
}, {
|
|
15099
15111
|
key: "release",
|
|
15100
15112
|
value: function release() {
|
|
@@ -16947,277 +16959,6 @@
|
|
|
16947
16959
|
}
|
|
16948
16960
|
}
|
|
16949
16961
|
|
|
16950
|
-
function __rest(s, e) {
|
|
16951
|
-
var t = {};
|
|
16952
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
16953
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16954
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
16955
|
-
}
|
|
16956
|
-
return t;
|
|
16957
|
-
}
|
|
16958
|
-
function __decorate$m(decorators, target, key, desc) {
|
|
16959
|
-
var c = arguments.length,
|
|
16960
|
-
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
16961
|
-
d;
|
|
16962
|
-
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16963
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16964
|
-
}
|
|
16965
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
16966
|
-
function adopt(value) {
|
|
16967
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
16968
|
-
resolve(value);
|
|
16969
|
-
});
|
|
16970
|
-
}
|
|
16971
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16972
|
-
function fulfilled(value) {
|
|
16973
|
-
try {
|
|
16974
|
-
step(generator.next(value));
|
|
16975
|
-
} catch (e) {
|
|
16976
|
-
reject(e);
|
|
16977
|
-
}
|
|
16978
|
-
}
|
|
16979
|
-
function rejected(value) {
|
|
16980
|
-
try {
|
|
16981
|
-
step(generator["throw"](value));
|
|
16982
|
-
} catch (e) {
|
|
16983
|
-
reject(e);
|
|
16984
|
-
}
|
|
16985
|
-
}
|
|
16986
|
-
function step(result) {
|
|
16987
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
16988
|
-
}
|
|
16989
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16990
|
-
});
|
|
16991
|
-
}
|
|
16992
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
16993
|
-
var e = new Error(message);
|
|
16994
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
16995
|
-
};
|
|
16996
|
-
|
|
16997
|
-
var ScrollBarPlugin_1;
|
|
16998
|
-
let ScrollBarPlugin = ScrollBarPlugin_1 = class ScrollBarPlugin {
|
|
16999
|
-
constructor() {
|
|
17000
|
-
this.name = 'scrollbar';
|
|
17001
|
-
this.activeEvent = 'onRegister';
|
|
17002
|
-
this._uid = Generator.GenAutoIncrementId();
|
|
17003
|
-
this.key = this.name + this._uid;
|
|
17004
|
-
this.scroll = (e) => {
|
|
17005
|
-
var _a;
|
|
17006
|
-
const graphic = e.target;
|
|
17007
|
-
const data = this.getScrollContainer(graphic);
|
|
17008
|
-
const { g: scrollContainer } = data;
|
|
17009
|
-
let { showH, showV } = data;
|
|
17010
|
-
if (!scrollContainer || scrollContainer.count === 1) {
|
|
17011
|
-
return;
|
|
17012
|
-
}
|
|
17013
|
-
this.scrollContainerBounds = scrollContainer.AABBBounds.clone();
|
|
17014
|
-
if (vutils.abs(e.deltaX) > vutils.abs(e.deltaY)) {
|
|
17015
|
-
showH = showH && true;
|
|
17016
|
-
showV = showV && false;
|
|
17017
|
-
}
|
|
17018
|
-
else {
|
|
17019
|
-
showH = showH && false;
|
|
17020
|
-
showV = showV && true;
|
|
17021
|
-
}
|
|
17022
|
-
scrollContainer.setAttributes({
|
|
17023
|
-
scrollX: showH ? (scrollContainer.attribute.scrollX || 0) + e.deltaX : scrollContainer.attribute.scrollX || 0,
|
|
17024
|
-
scrollY: showV ? (scrollContainer.attribute.scrollY || 0) + e.deltaY : scrollContainer.attribute.scrollY || 0
|
|
17025
|
-
});
|
|
17026
|
-
const childrenBounds = this.childrenBounds;
|
|
17027
|
-
const scrollContainerBounds = this.scrollContainerBounds;
|
|
17028
|
-
childrenBounds.clear();
|
|
17029
|
-
scrollContainer.forEachChildren((c) => {
|
|
17030
|
-
childrenBounds.union(c.AABBBounds);
|
|
17031
|
-
});
|
|
17032
|
-
childrenBounds.transformWithMatrix(scrollContainer.transMatrix);
|
|
17033
|
-
if (showH && scrollContainerBounds.x1 <= childrenBounds.x1 && scrollContainerBounds.x2 >= childrenBounds.x2) {
|
|
17034
|
-
showH = false;
|
|
17035
|
-
}
|
|
17036
|
-
if (showV && scrollContainerBounds.y1 <= childrenBounds.y1 && scrollContainerBounds.y2 >= childrenBounds.y2) {
|
|
17037
|
-
showV = false;
|
|
17038
|
-
}
|
|
17039
|
-
const m = scrollContainer.transMatrix;
|
|
17040
|
-
scrollContainerBounds.translate(-m.e, -m.f);
|
|
17041
|
-
childrenBounds.translate(-m.e, -m.f);
|
|
17042
|
-
if (showH) {
|
|
17043
|
-
childrenBounds.x1 = vutils.min(childrenBounds.x1, scrollContainerBounds.x1);
|
|
17044
|
-
childrenBounds.x2 = vutils.max(childrenBounds.x2, scrollContainerBounds.x2);
|
|
17045
|
-
}
|
|
17046
|
-
if (showV) {
|
|
17047
|
-
childrenBounds.y1 = vutils.min(childrenBounds.y1, scrollContainerBounds.y1);
|
|
17048
|
-
childrenBounds.y2 = vutils.max(childrenBounds.y2, scrollContainerBounds.y2);
|
|
17049
|
-
}
|
|
17050
|
-
childrenBounds.translate(scrollContainer.attribute.scrollX, scrollContainer.attribute.scrollY);
|
|
17051
|
-
const shadowRoot = (_a = scrollContainer.shadowRoot) !== null && _a !== void 0 ? _a : scrollContainer.attachShadow();
|
|
17052
|
-
const container = shadowRoot.createOrUpdateChild('scroll-bar', {}, 'group');
|
|
17053
|
-
const { h, v, deltaH, deltaV } = this.addOrUpdateScroll(showH, showV, container, scrollContainer);
|
|
17054
|
-
scrollContainer.setAttributes({
|
|
17055
|
-
scrollX: h ? scrollContainer.attribute.scrollX || 0 : (scrollContainer.attribute.scrollX || 0) + deltaH,
|
|
17056
|
-
scrollY: v ? scrollContainer.attribute.scrollY || 0 : (scrollContainer.attribute.scrollY || 0) + deltaV
|
|
17057
|
-
});
|
|
17058
|
-
};
|
|
17059
|
-
}
|
|
17060
|
-
activate(context) {
|
|
17061
|
-
this.pluginService = context;
|
|
17062
|
-
const { stage } = this.pluginService;
|
|
17063
|
-
this.childrenBounds = new vutils.AABBBounds();
|
|
17064
|
-
stage.addEventListener('wheel', this.scroll);
|
|
17065
|
-
this.params = ScrollBarPlugin_1.defaultParams;
|
|
17066
|
-
}
|
|
17067
|
-
addOrUpdateScroll(showH, showV, container, scrollContainer) {
|
|
17068
|
-
const scrollbars = container.children;
|
|
17069
|
-
let h = false;
|
|
17070
|
-
let v = false;
|
|
17071
|
-
let deltaH = 0;
|
|
17072
|
-
let deltaV = 0;
|
|
17073
|
-
if (showH) {
|
|
17074
|
-
const hScrollbar = scrollbars.filter((g) => g.attribute.direction !== 'vertical')[0];
|
|
17075
|
-
const d = this.addOrUpdateHScroll(this.scrollContainerBounds, container, hScrollbar);
|
|
17076
|
-
h = d.valid;
|
|
17077
|
-
deltaH = d.delta;
|
|
17078
|
-
this.disappearScrollBar(hScrollbar, v);
|
|
17079
|
-
}
|
|
17080
|
-
if (showV) {
|
|
17081
|
-
const vScrollbar = scrollbars.filter((g) => g.attribute.direction === 'vertical')[0];
|
|
17082
|
-
const d = this.addOrUpdateVScroll(this.scrollContainerBounds, container, vScrollbar);
|
|
17083
|
-
v = d.valid;
|
|
17084
|
-
deltaV = d.delta;
|
|
17085
|
-
this.disappearScrollBar(vScrollbar, v);
|
|
17086
|
-
}
|
|
17087
|
-
return {
|
|
17088
|
-
h,
|
|
17089
|
-
deltaH,
|
|
17090
|
-
v,
|
|
17091
|
-
deltaV
|
|
17092
|
-
};
|
|
17093
|
-
}
|
|
17094
|
-
addOrUpdateHScroll(scrollContainerB, container, scrollBar) {
|
|
17095
|
-
if (!scrollBar) {
|
|
17096
|
-
scrollBar = new ScrollBar({
|
|
17097
|
-
direction: 'horizontal',
|
|
17098
|
-
x: 0,
|
|
17099
|
-
y: 0,
|
|
17100
|
-
width: scrollContainerB.width(),
|
|
17101
|
-
height: 12,
|
|
17102
|
-
padding: [2, 0],
|
|
17103
|
-
railStyle: {
|
|
17104
|
-
fill: 'rgba(0, 0, 0, .1)'
|
|
17105
|
-
},
|
|
17106
|
-
range: [0, 0.05]
|
|
17107
|
-
});
|
|
17108
|
-
container.add(scrollBar);
|
|
17109
|
-
}
|
|
17110
|
-
const b = scrollBar.AABBBounds;
|
|
17111
|
-
const childrenBounds = this.childrenBounds;
|
|
17112
|
-
const y = scrollContainerB.y2 - b.height();
|
|
17113
|
-
const ratio = Math.min(b.width() / this.childrenBounds.width(), 1);
|
|
17114
|
-
let start = ((scrollContainerB.x1 - childrenBounds.x1) / (childrenBounds.width() - scrollContainerB.width())) * (1 - ratio);
|
|
17115
|
-
let valid = true;
|
|
17116
|
-
let delta = 0;
|
|
17117
|
-
if (start < 0) {
|
|
17118
|
-
start = 0;
|
|
17119
|
-
valid = false;
|
|
17120
|
-
delta = scrollContainerB.x1 - childrenBounds.x1;
|
|
17121
|
-
}
|
|
17122
|
-
else if (start + ratio > 1) {
|
|
17123
|
-
start = 1 - ratio;
|
|
17124
|
-
valid = false;
|
|
17125
|
-
delta = scrollContainerB.x1 - childrenBounds.x1 - (childrenBounds.width() - scrollContainerB.width());
|
|
17126
|
-
}
|
|
17127
|
-
scrollBar.setAttributes({
|
|
17128
|
-
y,
|
|
17129
|
-
visibleAll: true,
|
|
17130
|
-
range: [start, start + ratio]
|
|
17131
|
-
});
|
|
17132
|
-
return {
|
|
17133
|
-
valid,
|
|
17134
|
-
delta
|
|
17135
|
-
};
|
|
17136
|
-
}
|
|
17137
|
-
addOrUpdateVScroll(scrollContainerB, container, scrollBar) {
|
|
17138
|
-
if (!scrollBar) {
|
|
17139
|
-
scrollBar = new ScrollBar({
|
|
17140
|
-
direction: 'vertical',
|
|
17141
|
-
x: 0,
|
|
17142
|
-
y: 0,
|
|
17143
|
-
width: 12,
|
|
17144
|
-
height: scrollContainerB.height(),
|
|
17145
|
-
padding: [2, 0],
|
|
17146
|
-
railStyle: {
|
|
17147
|
-
fill: 'rgba(0, 0, 0, .1)'
|
|
17148
|
-
},
|
|
17149
|
-
range: [0, 0.05]
|
|
17150
|
-
});
|
|
17151
|
-
container.add(scrollBar);
|
|
17152
|
-
}
|
|
17153
|
-
const b = scrollBar.AABBBounds;
|
|
17154
|
-
const x = scrollContainerB.x2 - b.width();
|
|
17155
|
-
const childrenBounds = this.childrenBounds;
|
|
17156
|
-
const ratio = Math.min(b.height() / childrenBounds.height(), 1);
|
|
17157
|
-
let start = ((scrollContainerB.y1 - childrenBounds.y1) / (childrenBounds.height() - scrollContainerB.height())) * (1 - ratio);
|
|
17158
|
-
let valid = true;
|
|
17159
|
-
let delta = 0;
|
|
17160
|
-
if (start < 0) {
|
|
17161
|
-
start = 0;
|
|
17162
|
-
valid = false;
|
|
17163
|
-
delta = scrollContainerB.y1 - childrenBounds.y1;
|
|
17164
|
-
}
|
|
17165
|
-
else if (start + ratio > 1) {
|
|
17166
|
-
start = 1 - ratio;
|
|
17167
|
-
valid = false;
|
|
17168
|
-
delta = scrollContainerB.y1 - childrenBounds.y1 - (childrenBounds.height() - scrollContainerB.height());
|
|
17169
|
-
}
|
|
17170
|
-
scrollBar.setAttributes({
|
|
17171
|
-
x,
|
|
17172
|
-
visibleAll: true,
|
|
17173
|
-
range: [start, start + ratio]
|
|
17174
|
-
});
|
|
17175
|
-
return {
|
|
17176
|
-
valid,
|
|
17177
|
-
delta
|
|
17178
|
-
};
|
|
17179
|
-
}
|
|
17180
|
-
disappearScrollBar(scrollBar, valid) {
|
|
17181
|
-
var _a;
|
|
17182
|
-
if (scrollBar._plugin_timeout) {
|
|
17183
|
-
clearTimeout(scrollBar._plugin_timeout);
|
|
17184
|
-
}
|
|
17185
|
-
scrollBar._plugin_timeout = setTimeout(() => {
|
|
17186
|
-
scrollBar.setAttribute('visibleAll', false);
|
|
17187
|
-
}, (_a = this.params.timeout) !== null && _a !== void 0 ? _a : 0);
|
|
17188
|
-
}
|
|
17189
|
-
getScrollContainer(graphic) {
|
|
17190
|
-
let g = graphic;
|
|
17191
|
-
while (g) {
|
|
17192
|
-
if (g.attribute.overflow && g.attribute.overflow !== 'hidden') {
|
|
17193
|
-
const overflow = g.attribute.overflow;
|
|
17194
|
-
let showH = false;
|
|
17195
|
-
let showV = false;
|
|
17196
|
-
if (overflow === 'scroll') {
|
|
17197
|
-
(showH = true), (showV = true);
|
|
17198
|
-
}
|
|
17199
|
-
else {
|
|
17200
|
-
showH = overflow === 'scroll-x';
|
|
17201
|
-
showV = !showH;
|
|
17202
|
-
}
|
|
17203
|
-
return { g: g, showH, showV };
|
|
17204
|
-
}
|
|
17205
|
-
g = g.parent;
|
|
17206
|
-
}
|
|
17207
|
-
return null;
|
|
17208
|
-
}
|
|
17209
|
-
deactivate(context) {
|
|
17210
|
-
const { stage } = this.pluginService;
|
|
17211
|
-
stage.removeEventListener('wheel', this.scroll);
|
|
17212
|
-
}
|
|
17213
|
-
};
|
|
17214
|
-
ScrollBarPlugin.defaultParams = {
|
|
17215
|
-
timeout: 500
|
|
17216
|
-
};
|
|
17217
|
-
ScrollBarPlugin = ScrollBarPlugin_1 = __decorate$m([
|
|
17218
|
-
injectable()
|
|
17219
|
-
], ScrollBarPlugin);
|
|
17220
|
-
|
|
17221
16962
|
var MathPickerContribution = Symbol["for"]("MathPickerContribution");
|
|
17222
16963
|
var MathArcPicker = Symbol["for"]("MathArcPicker");
|
|
17223
16964
|
var MathAreaPicker = Symbol["for"]("MathAreaPicker");
|
|
@@ -17242,7 +16983,7 @@
|
|
|
17242
16983
|
var CanvasRichTextPicker = Symbol["for"]("CanvasRichTextPicker");
|
|
17243
16984
|
var CanvasPickerContribution = Symbol["for"]("CanvasPickerContribution");
|
|
17244
16985
|
|
|
17245
|
-
var __decorate$
|
|
16986
|
+
var __decorate$m = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17246
16987
|
var d,
|
|
17247
16988
|
c = arguments.length,
|
|
17248
16989
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17294,14 +17035,14 @@
|
|
|
17294
17035
|
}]);
|
|
17295
17036
|
return DefaultCanvasArcPicker;
|
|
17296
17037
|
}();
|
|
17297
|
-
DefaultCanvasArcPicker = __decorate$
|
|
17038
|
+
DefaultCanvasArcPicker = __decorate$m([injectable(), __param$h(0, inject(ArcRender)), __metadata$h("design:paramtypes", [Object])], DefaultCanvasArcPicker);
|
|
17298
17039
|
|
|
17299
17040
|
var loadArcPick$1 = !1;
|
|
17300
17041
|
var arcCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
17301
17042
|
loadArcPick$1 || (loadArcPick$1 = !0, bind(CanvasArcPicker).to(DefaultCanvasArcPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasArcPicker));
|
|
17302
17043
|
});
|
|
17303
17044
|
|
|
17304
|
-
var __decorate$
|
|
17045
|
+
var __decorate$l = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17305
17046
|
var d,
|
|
17306
17047
|
c = arguments.length,
|
|
17307
17048
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17353,14 +17094,14 @@
|
|
|
17353
17094
|
}]);
|
|
17354
17095
|
return DefaultMathArcPicker;
|
|
17355
17096
|
}();
|
|
17356
|
-
DefaultMathArcPicker = __decorate$
|
|
17097
|
+
DefaultMathArcPicker = __decorate$l([injectable(), __param$g(0, inject(ArcRender)), __metadata$g("design:paramtypes", [Object])], DefaultMathArcPicker);
|
|
17357
17098
|
|
|
17358
17099
|
var loadArcPick = !1;
|
|
17359
17100
|
var arcMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
17360
17101
|
loadArcPick || (loadArcPick = !0, bind(MathArcPicker).to(DefaultMathArcPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathArcPicker));
|
|
17361
17102
|
});
|
|
17362
17103
|
|
|
17363
|
-
var __decorate$
|
|
17104
|
+
var __decorate$k = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17364
17105
|
var d,
|
|
17365
17106
|
c = arguments.length,
|
|
17366
17107
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17431,14 +17172,14 @@
|
|
|
17431
17172
|
}]);
|
|
17432
17173
|
return DefaultCanvasRectPicker;
|
|
17433
17174
|
}();
|
|
17434
|
-
DefaultCanvasRectPicker = __decorate$
|
|
17175
|
+
DefaultCanvasRectPicker = __decorate$k([injectable(), __param$f(0, inject(RectRender)), __metadata$f("design:paramtypes", [Object])], DefaultCanvasRectPicker);
|
|
17435
17176
|
|
|
17436
17177
|
var loadRectPick$1 = !1;
|
|
17437
17178
|
var rectCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
17438
17179
|
loadRectPick$1 || (loadRectPick$1 = !0, bind(CanvasRectPicker).to(DefaultCanvasRectPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasRectPicker));
|
|
17439
17180
|
});
|
|
17440
17181
|
|
|
17441
|
-
var __decorate$
|
|
17182
|
+
var __decorate$j = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17442
17183
|
var d,
|
|
17443
17184
|
c = arguments.length,
|
|
17444
17185
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17509,14 +17250,14 @@
|
|
|
17509
17250
|
}]);
|
|
17510
17251
|
return DefaultMathRectPicker;
|
|
17511
17252
|
}();
|
|
17512
|
-
DefaultMathRectPicker = __decorate$
|
|
17253
|
+
DefaultMathRectPicker = __decorate$j([injectable(), __param$e(0, inject(RectRender)), __metadata$e("design:paramtypes", [Object])], DefaultMathRectPicker);
|
|
17513
17254
|
|
|
17514
17255
|
var loadRectPick = !1;
|
|
17515
17256
|
var rectMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
17516
17257
|
loadRectPick || (loadRectPick = !0, bind(MathRectPicker).to(DefaultMathRectPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathRectPicker));
|
|
17517
17258
|
});
|
|
17518
17259
|
|
|
17519
|
-
var __decorate$
|
|
17260
|
+
var __decorate$i = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17520
17261
|
var d,
|
|
17521
17262
|
c = arguments.length,
|
|
17522
17263
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17532,9 +17273,9 @@
|
|
|
17532
17273
|
}
|
|
17533
17274
|
return _createClass(BasePicker);
|
|
17534
17275
|
}(BaseRender);
|
|
17535
|
-
BasePicker = __decorate$
|
|
17276
|
+
BasePicker = __decorate$i([injectable()], BasePicker);
|
|
17536
17277
|
|
|
17537
|
-
var __decorate$
|
|
17278
|
+
var __decorate$h = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17538
17279
|
var d,
|
|
17539
17280
|
c = arguments.length,
|
|
17540
17281
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17593,14 +17334,14 @@
|
|
|
17593
17334
|
}]);
|
|
17594
17335
|
return DefaultCanvasLinePicker;
|
|
17595
17336
|
}(BasePicker);
|
|
17596
|
-
DefaultCanvasLinePicker = __decorate$
|
|
17337
|
+
DefaultCanvasLinePicker = __decorate$h([injectable(), __param$d(0, inject(LineRender)), __metadata$d("design:paramtypes", [Object])], DefaultCanvasLinePicker);
|
|
17597
17338
|
|
|
17598
17339
|
var loadLinePick$1 = !1;
|
|
17599
17340
|
var lineCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
17600
17341
|
loadLinePick$1 || (loadLinePick$1 = !0, bind(CanvasLinePicker).to(DefaultCanvasLinePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasLinePicker));
|
|
17601
17342
|
});
|
|
17602
17343
|
|
|
17603
|
-
var __decorate$
|
|
17344
|
+
var __decorate$g = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17604
17345
|
var d,
|
|
17605
17346
|
c = arguments.length,
|
|
17606
17347
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17651,14 +17392,14 @@
|
|
|
17651
17392
|
}]);
|
|
17652
17393
|
return DefaultMathLinePicker;
|
|
17653
17394
|
}();
|
|
17654
|
-
DefaultMathLinePicker = __decorate$
|
|
17395
|
+
DefaultMathLinePicker = __decorate$g([injectable(), __param$c(0, inject(LineRender)), __metadata$c("design:paramtypes", [Object])], DefaultMathLinePicker);
|
|
17655
17396
|
|
|
17656
17397
|
var loadLinePick = !1;
|
|
17657
17398
|
var lineMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
17658
17399
|
loadLinePick || (loadLinePick = !0, bind(MathLinePicker).to(DefaultMathLinePicker).inSingletonScope(), bind(MathPickerContribution).toService(MathLinePicker));
|
|
17659
17400
|
});
|
|
17660
17401
|
|
|
17661
|
-
var __decorate$
|
|
17402
|
+
var __decorate$f = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17662
17403
|
var d,
|
|
17663
17404
|
c = arguments.length,
|
|
17664
17405
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17704,14 +17445,14 @@
|
|
|
17704
17445
|
}]);
|
|
17705
17446
|
return DefaultCanvasAreaPicker;
|
|
17706
17447
|
}();
|
|
17707
|
-
DefaultCanvasAreaPicker = __decorate$
|
|
17448
|
+
DefaultCanvasAreaPicker = __decorate$f([injectable(), __param$b(0, inject(AreaRender)), __metadata$b("design:paramtypes", [Object])], DefaultCanvasAreaPicker);
|
|
17708
17449
|
|
|
17709
17450
|
var loadAreaPick$1 = !1;
|
|
17710
17451
|
var areaCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
17711
17452
|
loadAreaPick$1 || (loadAreaPick$1 = !0, bind(CanvasAreaPicker).to(DefaultCanvasAreaPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasAreaPicker));
|
|
17712
17453
|
});
|
|
17713
17454
|
|
|
17714
|
-
var __decorate$
|
|
17455
|
+
var __decorate$e = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17715
17456
|
var d,
|
|
17716
17457
|
c = arguments.length,
|
|
17717
17458
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17757,14 +17498,14 @@
|
|
|
17757
17498
|
}]);
|
|
17758
17499
|
return DefaultMathAreaPicker;
|
|
17759
17500
|
}();
|
|
17760
|
-
DefaultMathAreaPicker = __decorate$
|
|
17501
|
+
DefaultMathAreaPicker = __decorate$e([injectable(), __param$a(0, inject(AreaRender)), __metadata$a("design:paramtypes", [Object])], DefaultMathAreaPicker);
|
|
17761
17502
|
|
|
17762
17503
|
var loadAreaPick = !1;
|
|
17763
17504
|
var areaMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
17764
17505
|
loadAreaPick || (loadAreaPick = !0, bind(MathAreaPicker).to(DefaultMathAreaPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathAreaPicker));
|
|
17765
17506
|
});
|
|
17766
17507
|
|
|
17767
|
-
var __decorate$
|
|
17508
|
+
var __decorate$d = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17768
17509
|
var d,
|
|
17769
17510
|
c = arguments.length,
|
|
17770
17511
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17826,14 +17567,14 @@
|
|
|
17826
17567
|
}]);
|
|
17827
17568
|
return DefaultCanvasSymbolPicker;
|
|
17828
17569
|
}(BasePicker);
|
|
17829
|
-
DefaultCanvasSymbolPicker = __decorate$
|
|
17570
|
+
DefaultCanvasSymbolPicker = __decorate$d([injectable(), __param$9(0, inject(SymbolRender)), __metadata$9("design:paramtypes", [Object])], DefaultCanvasSymbolPicker);
|
|
17830
17571
|
|
|
17831
17572
|
var loadSymbolPick$1 = !1;
|
|
17832
17573
|
var symbolCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
17833
17574
|
loadSymbolPick$1 || (loadSymbolPick$1 = !0, bind(CanvasSymbolPicker).to(DefaultCanvasSymbolPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasSymbolPicker));
|
|
17834
17575
|
});
|
|
17835
17576
|
|
|
17836
|
-
var __decorate$
|
|
17577
|
+
var __decorate$c = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17837
17578
|
var d,
|
|
17838
17579
|
c = arguments.length,
|
|
17839
17580
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17884,14 +17625,14 @@
|
|
|
17884
17625
|
}]);
|
|
17885
17626
|
return DefaultMathSymbolPicker;
|
|
17886
17627
|
}();
|
|
17887
|
-
DefaultMathSymbolPicker = __decorate$
|
|
17628
|
+
DefaultMathSymbolPicker = __decorate$c([injectable(), __param$8(0, inject(SymbolRender)), __metadata$8("design:paramtypes", [Object])], DefaultMathSymbolPicker);
|
|
17888
17629
|
|
|
17889
17630
|
var loadSymbolPick = !1;
|
|
17890
17631
|
var symbolMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
17891
17632
|
loadSymbolPick || (loadSymbolPick = !0, bind(MathSymbolPicker).to(DefaultMathSymbolPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathSymbolPicker));
|
|
17892
17633
|
});
|
|
17893
17634
|
|
|
17894
|
-
var __decorate$
|
|
17635
|
+
var __decorate$b = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17895
17636
|
var d,
|
|
17896
17637
|
c = arguments.length,
|
|
17897
17638
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -17942,14 +17683,14 @@
|
|
|
17942
17683
|
}]);
|
|
17943
17684
|
return DefaultCanvasCirclePicker;
|
|
17944
17685
|
}();
|
|
17945
|
-
DefaultCanvasCirclePicker = __decorate$
|
|
17686
|
+
DefaultCanvasCirclePicker = __decorate$b([injectable(), __param$7(0, inject(CircleRender)), __metadata$7("design:paramtypes", [Object])], DefaultCanvasCirclePicker);
|
|
17946
17687
|
|
|
17947
17688
|
var loadCirclePick$1 = !1;
|
|
17948
17689
|
var circleCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
17949
17690
|
loadCirclePick$1 || (loadCirclePick$1 = !0, bind(CanvasCirclePicker).to(DefaultCanvasCirclePicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasCirclePicker));
|
|
17950
17691
|
});
|
|
17951
17692
|
|
|
17952
|
-
var __decorate$
|
|
17693
|
+
var __decorate$a = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
17953
17694
|
var d,
|
|
17954
17695
|
c = arguments.length,
|
|
17955
17696
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18000,14 +17741,14 @@
|
|
|
18000
17741
|
}]);
|
|
18001
17742
|
return DefaultMathCirclePicker;
|
|
18002
17743
|
}();
|
|
18003
|
-
DefaultMathCirclePicker = __decorate$
|
|
17744
|
+
DefaultMathCirclePicker = __decorate$a([injectable(), __param$6(0, inject(CircleRender)), __metadata$6("design:paramtypes", [Object])], DefaultMathCirclePicker);
|
|
18004
17745
|
|
|
18005
17746
|
var loadCirclePick = !1;
|
|
18006
17747
|
var circleMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
18007
17748
|
loadCirclePick || (loadCirclePick = !0, bind(MathCirclePicker).to(DefaultMathCirclePicker).inSingletonScope(), bind(MathPickerContribution).toService(MathCirclePicker));
|
|
18008
17749
|
});
|
|
18009
17750
|
|
|
18010
|
-
var __decorate$
|
|
17751
|
+
var __decorate$9 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18011
17752
|
var d,
|
|
18012
17753
|
c = arguments.length,
|
|
18013
17754
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18079,14 +17820,14 @@
|
|
|
18079
17820
|
}]);
|
|
18080
17821
|
return DefaultCanvasTextPicker;
|
|
18081
17822
|
}(BasePicker);
|
|
18082
|
-
DefaultCanvasTextPicker = __decorate$
|
|
17823
|
+
DefaultCanvasTextPicker = __decorate$9([injectable(), __param$5(0, inject(TextRender)), __metadata$5("design:paramtypes", [Object])], DefaultCanvasTextPicker);
|
|
18083
17824
|
|
|
18084
17825
|
var loadTextPick$1 = !1;
|
|
18085
17826
|
var textCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
18086
17827
|
loadTextPick$1 || (loadTextPick$1 = !0, bind(CanvasTextPicker).to(DefaultCanvasTextPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasTextPicker));
|
|
18087
17828
|
});
|
|
18088
17829
|
|
|
18089
|
-
var __decorate$
|
|
17830
|
+
var __decorate$8 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18090
17831
|
var d,
|
|
18091
17832
|
c = arguments.length,
|
|
18092
17833
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18106,14 +17847,14 @@
|
|
|
18106
17847
|
}]);
|
|
18107
17848
|
return DefaultMathTextPicker;
|
|
18108
17849
|
}();
|
|
18109
|
-
DefaultMathTextPicker = __decorate$
|
|
17850
|
+
DefaultMathTextPicker = __decorate$8([injectable()], DefaultMathTextPicker);
|
|
18110
17851
|
|
|
18111
17852
|
var loadTextPick = !1;
|
|
18112
17853
|
var textMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
18113
17854
|
loadTextPick || (loadTextPick = !0, bind(MathTextPicker).to(DefaultMathTextPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathTextPicker));
|
|
18114
17855
|
});
|
|
18115
17856
|
|
|
18116
|
-
var __decorate$
|
|
17857
|
+
var __decorate$7 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18117
17858
|
var d,
|
|
18118
17859
|
c = arguments.length,
|
|
18119
17860
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18172,14 +17913,14 @@
|
|
|
18172
17913
|
}]);
|
|
18173
17914
|
return DefaultCanvasPathPicker;
|
|
18174
17915
|
}(BasePicker);
|
|
18175
|
-
DefaultCanvasPathPicker = __decorate$
|
|
17916
|
+
DefaultCanvasPathPicker = __decorate$7([injectable(), __param$4(0, inject(PathRender)), __metadata$4("design:paramtypes", [Object])], DefaultCanvasPathPicker);
|
|
18176
17917
|
|
|
18177
17918
|
var loadPathPick$1 = !1;
|
|
18178
17919
|
var pathCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
18179
17920
|
loadPathPick$1 || (loadPathPick$1 = !0, bind(CanvasPathPicker).to(DefaultCanvasPathPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasPathPicker));
|
|
18180
17921
|
});
|
|
18181
17922
|
|
|
18182
|
-
var __decorate$
|
|
17923
|
+
var __decorate$6 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18183
17924
|
var d,
|
|
18184
17925
|
c = arguments.length,
|
|
18185
17926
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18230,14 +17971,14 @@
|
|
|
18230
17971
|
}]);
|
|
18231
17972
|
return DefaultMathPathPicker;
|
|
18232
17973
|
}();
|
|
18233
|
-
DefaultMathPathPicker = __decorate$
|
|
17974
|
+
DefaultMathPathPicker = __decorate$6([injectable(), __param$3(0, inject(PathRender)), __metadata$3("design:paramtypes", [Object])], DefaultMathPathPicker);
|
|
18234
17975
|
|
|
18235
17976
|
var loadPathPick = !1;
|
|
18236
17977
|
var pathMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
18237
17978
|
loadPathPick || (loadPathPick = !0, bind(MathPathPicker).to(DefaultMathPathPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathPathPicker));
|
|
18238
17979
|
});
|
|
18239
17980
|
|
|
18240
|
-
var __decorate$
|
|
17981
|
+
var __decorate$5 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18241
17982
|
var d,
|
|
18242
17983
|
c = arguments.length,
|
|
18243
17984
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18288,14 +18029,14 @@
|
|
|
18288
18029
|
}]);
|
|
18289
18030
|
return DefaultCanvasPolygonPicker;
|
|
18290
18031
|
}();
|
|
18291
|
-
DefaultCanvasPolygonPicker = __decorate$
|
|
18032
|
+
DefaultCanvasPolygonPicker = __decorate$5([injectable(), __param$2(0, inject(PolygonRender)), __metadata$2("design:paramtypes", [Object])], DefaultCanvasPolygonPicker);
|
|
18292
18033
|
|
|
18293
18034
|
var loadPolygonPick$1 = !1;
|
|
18294
18035
|
var polygonCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
18295
18036
|
loadPolygonPick$1 || (loadPolygonPick$1 = !0, bind(CanvasPolygonPicker).to(DefaultCanvasPolygonPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasPolygonPicker));
|
|
18296
18037
|
});
|
|
18297
18038
|
|
|
18298
|
-
var __decorate$
|
|
18039
|
+
var __decorate$4 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18299
18040
|
var d,
|
|
18300
18041
|
c = arguments.length,
|
|
18301
18042
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18345,14 +18086,14 @@
|
|
|
18345
18086
|
}]);
|
|
18346
18087
|
return DefaultMathPolygonPicker;
|
|
18347
18088
|
}();
|
|
18348
|
-
DefaultMathPolygonPicker = __decorate$
|
|
18089
|
+
DefaultMathPolygonPicker = __decorate$4([injectable(), __param$1(0, inject(PolygonRender)), __metadata$1("design:paramtypes", [Object])], DefaultMathPolygonPicker);
|
|
18349
18090
|
|
|
18350
18091
|
var loadPolygonPick = !1;
|
|
18351
18092
|
var polygonMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
18352
18093
|
loadPolygonPick || (loadPolygonPick = !0, bind(MathPolygonPicker).to(DefaultMathPolygonPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathPolygonPicker));
|
|
18353
18094
|
});
|
|
18354
18095
|
|
|
18355
|
-
var __decorate$
|
|
18096
|
+
var __decorate$3 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18356
18097
|
var d,
|
|
18357
18098
|
c = arguments.length,
|
|
18358
18099
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18380,14 +18121,14 @@
|
|
|
18380
18121
|
}]);
|
|
18381
18122
|
return DefaultCanvasRichTextPicker;
|
|
18382
18123
|
}();
|
|
18383
|
-
DefaultCanvasRichTextPicker = __decorate$
|
|
18124
|
+
DefaultCanvasRichTextPicker = __decorate$3([injectable(), __param(0, inject(RichTextRender)), __metadata("design:paramtypes", [Object])], DefaultCanvasRichTextPicker);
|
|
18384
18125
|
|
|
18385
18126
|
var loadRichtextPick = !1;
|
|
18386
18127
|
var richtextCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
18387
18128
|
loadRichtextPick || (loadRichtextPick = !0, bind(CanvasRichTextPicker).to(DefaultCanvasRichTextPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasRichTextPicker));
|
|
18388
18129
|
});
|
|
18389
18130
|
|
|
18390
|
-
var __decorate$
|
|
18131
|
+
var __decorate$2 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18391
18132
|
var d,
|
|
18392
18133
|
c = arguments.length,
|
|
18393
18134
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18409,14 +18150,14 @@
|
|
|
18409
18150
|
}]);
|
|
18410
18151
|
return DefaultMathImagePicker;
|
|
18411
18152
|
}();
|
|
18412
|
-
DefaultMathImagePicker = __decorate$
|
|
18153
|
+
DefaultMathImagePicker = __decorate$2([injectable()], DefaultMathImagePicker);
|
|
18413
18154
|
|
|
18414
18155
|
var loadRichTextPick = !1;
|
|
18415
18156
|
var richTextMathPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
18416
18157
|
loadRichTextPick || (loadRichTextPick = !0, bind(MathImagePicker).to(DefaultMathImagePicker).inSingletonScope(), bind(DefaultMathImagePicker).toService(MathImagePicker));
|
|
18417
18158
|
});
|
|
18418
18159
|
|
|
18419
|
-
var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18160
|
+
var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
18420
18161
|
var d,
|
|
18421
18162
|
c = arguments.length,
|
|
18422
18163
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
@@ -18438,7 +18179,7 @@
|
|
|
18438
18179
|
}]);
|
|
18439
18180
|
return DefaultCanvasImagePicker;
|
|
18440
18181
|
}();
|
|
18441
|
-
DefaultCanvasImagePicker = __decorate([injectable()], DefaultCanvasImagePicker);
|
|
18182
|
+
DefaultCanvasImagePicker = __decorate$1([injectable()], DefaultCanvasImagePicker);
|
|
18442
18183
|
|
|
18443
18184
|
var loadImagePick$1 = !1;
|
|
18444
18185
|
var imageCanvasPickModule = new ContainerModule(function (bind, unbind, isBound, rebind) {
|
|
@@ -18517,12 +18258,6 @@
|
|
|
18517
18258
|
loaded || (loaded = !0, registerWrapTextGraphic());
|
|
18518
18259
|
}
|
|
18519
18260
|
|
|
18520
|
-
new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
18521
|
-
if (!isBound(ScrollBarPlugin)) {
|
|
18522
|
-
bind(ScrollBarPlugin).toSelf();
|
|
18523
|
-
bind(AutoEnablePlugins).toService(ScrollBarPlugin);
|
|
18524
|
-
}
|
|
18525
|
-
});
|
|
18526
18261
|
function loadScrollbarComponent() {
|
|
18527
18262
|
registerGroup();
|
|
18528
18263
|
registerRect();
|
|
@@ -18565,6 +18300,10 @@
|
|
|
18565
18300
|
e.stopPropagation();
|
|
18566
18301
|
const { direction } = this.attribute;
|
|
18567
18302
|
this._prePos = direction === 'horizontal' ? e.clientX : e.clientY;
|
|
18303
|
+
this._dispatchEvent('scrollDown', {
|
|
18304
|
+
pos: this._prePos,
|
|
18305
|
+
event: e
|
|
18306
|
+
});
|
|
18568
18307
|
if (vglobal.env === 'browser') {
|
|
18569
18308
|
vglobal.addEventListener('pointermove', this._onSliderPointerMove, { capture: true });
|
|
18570
18309
|
vglobal.addEventListener('pointerup', this._onSliderPointerUp);
|
|
@@ -18768,6 +18507,53 @@
|
|
|
18768
18507
|
realTime: true
|
|
18769
18508
|
};
|
|
18770
18509
|
|
|
18510
|
+
function __rest(s, e) {
|
|
18511
|
+
var t = {};
|
|
18512
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
18513
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18514
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
18515
|
+
}
|
|
18516
|
+
return t;
|
|
18517
|
+
}
|
|
18518
|
+
function __decorate(decorators, target, key, desc) {
|
|
18519
|
+
var c = arguments.length,
|
|
18520
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
18521
|
+
d;
|
|
18522
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18523
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18524
|
+
}
|
|
18525
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
18526
|
+
function adopt(value) {
|
|
18527
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
18528
|
+
resolve(value);
|
|
18529
|
+
});
|
|
18530
|
+
}
|
|
18531
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18532
|
+
function fulfilled(value) {
|
|
18533
|
+
try {
|
|
18534
|
+
step(generator.next(value));
|
|
18535
|
+
} catch (e) {
|
|
18536
|
+
reject(e);
|
|
18537
|
+
}
|
|
18538
|
+
}
|
|
18539
|
+
function rejected(value) {
|
|
18540
|
+
try {
|
|
18541
|
+
step(generator["throw"](value));
|
|
18542
|
+
} catch (e) {
|
|
18543
|
+
reject(e);
|
|
18544
|
+
}
|
|
18545
|
+
}
|
|
18546
|
+
function step(result) {
|
|
18547
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
18548
|
+
}
|
|
18549
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18550
|
+
});
|
|
18551
|
+
}
|
|
18552
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
18553
|
+
var e = new Error(message);
|
|
18554
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
18555
|
+
};
|
|
18556
|
+
|
|
18771
18557
|
function traverseGroup(group, cb) {
|
|
18772
18558
|
group.forEachChildren(node => {
|
|
18773
18559
|
const stopped = cb(node);
|
|
@@ -18804,13 +18590,12 @@
|
|
|
18804
18590
|
}
|
|
18805
18591
|
|
|
18806
18592
|
const defaultAlternativeColors = ['#ffffff', '#000000'];
|
|
18807
|
-
const { Color } = vutils.ColorUtil;
|
|
18808
18593
|
function labelSmartInvert(foregroundColorOrigin, backgroundColorOrogin, textType, contrastRatiosThreshold, alternativeColors, mode) {
|
|
18809
18594
|
if (typeof foregroundColorOrigin !== 'string' || typeof backgroundColorOrogin !== 'string') {
|
|
18810
18595
|
return foregroundColorOrigin;
|
|
18811
18596
|
}
|
|
18812
|
-
const foregroundColor = new Color(foregroundColorOrigin).toHex();
|
|
18813
|
-
const backgroundColor = new Color(backgroundColorOrogin).toHex();
|
|
18597
|
+
const foregroundColor = new vutils.Color(foregroundColorOrigin).toHex();
|
|
18598
|
+
const backgroundColor = new vutils.Color(backgroundColorOrogin).toHex();
|
|
18814
18599
|
if (!contrastAccessibilityChecker(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, mode)) {
|
|
18815
18600
|
return improveContrastReverse(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors, mode);
|
|
18816
18601
|
}
|
|
@@ -18839,8 +18624,8 @@
|
|
|
18839
18624
|
}
|
|
18840
18625
|
function contrastAccessibilityChecker(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, mode) {
|
|
18841
18626
|
if (mode === 'lightness') {
|
|
18842
|
-
const backgroundColorLightness = Color.getColorBrightness(new Color(backgroundColor));
|
|
18843
|
-
const foregroundColorLightness = Color.getColorBrightness(new Color(foregroundColor));
|
|
18627
|
+
const backgroundColorLightness = vutils.Color.getColorBrightness(new vutils.Color(backgroundColor));
|
|
18628
|
+
const foregroundColorLightness = vutils.Color.getColorBrightness(new vutils.Color(foregroundColor));
|
|
18844
18629
|
if (foregroundColorLightness < 0.5) {
|
|
18845
18630
|
if (backgroundColorLightness >= 0.5) {
|
|
18846
18631
|
return true;
|
|
@@ -18878,7 +18663,7 @@
|
|
|
18878
18663
|
return contrastRatios;
|
|
18879
18664
|
}
|
|
18880
18665
|
function getColorLuminance(color) {
|
|
18881
|
-
const rgb8bit = vutils.
|
|
18666
|
+
const rgb8bit = vutils.hexToRgb(color);
|
|
18882
18667
|
const RsRGB = rgb8bit[0] / 255;
|
|
18883
18668
|
const GsRGB = rgb8bit[1] / 255;
|
|
18884
18669
|
const BsRGB = rgb8bit[2] / 255;
|
|
@@ -19186,199 +18971,21 @@
|
|
|
19186
18971
|
poptip: vutils.merge({}, DEFAULT_THEME)
|
|
19187
18972
|
};
|
|
19188
18973
|
|
|
19189
|
-
function
|
|
19190
|
-
|
|
19191
|
-
|
|
18974
|
+
function loadPoptipComponent() {
|
|
18975
|
+
registerGroup();
|
|
18976
|
+
registerWrapText();
|
|
18977
|
+
registerSymbol();
|
|
18978
|
+
registerRect();
|
|
18979
|
+
}
|
|
18980
|
+
function setPoptipTheme(defaultPoptipTheme) {
|
|
18981
|
+
vutils.merge(theme.poptip, DEFAULT_THEME, defaultPoptipTheme);
|
|
19192
18982
|
}
|
|
19193
|
-
let PopTipRenderContribution = class PopTipRenderContribution {
|
|
19194
|
-
render(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
|
|
19195
|
-
var _a;
|
|
19196
|
-
if (graphic._showPoptip === 1) {
|
|
19197
|
-
const { visible, visibleCb } = graphic.attribute.poptip || {};
|
|
19198
|
-
if (visible === false || (visibleCb && visibleCb(graphic) === false)) {
|
|
19199
|
-
return;
|
|
19200
|
-
}
|
|
19201
|
-
const attribute = {};
|
|
19202
|
-
vutils.merge(attribute, PopTip.defaultAttributes, graphic.attribute.poptip ? graphic.attribute.poptip : {});
|
|
19203
|
-
if (!this.poptipComponent) {
|
|
19204
|
-
this.poptipComponent = new PopTip(attribute);
|
|
19205
|
-
}
|
|
19206
|
-
else {
|
|
19207
|
-
this.poptipComponent.initAttributes(attribute);
|
|
19208
|
-
}
|
|
19209
|
-
let poptip = graphic.attribute.poptip || {};
|
|
19210
|
-
if (graphic.type === 'text' && poptip.title == null && poptip.content == null) {
|
|
19211
|
-
const out = {};
|
|
19212
|
-
wrapPoptip(out, poptip);
|
|
19213
|
-
poptip = out;
|
|
19214
|
-
poptip.content = (_a = poptip.content) !== null && _a !== void 0 ? _a : graphic.attribute.text;
|
|
19215
|
-
}
|
|
19216
|
-
const matrix = graphic.globalTransMatrix;
|
|
19217
|
-
this.poptipComponent.setAttributes(Object.assign(Object.assign({ visibleAll: true, pickable: false, childrenPickable: false }, poptip), { x: matrix.e, y: matrix.f }));
|
|
19218
|
-
drawContext.stage.tryInitInteractiveLayer();
|
|
19219
|
-
const interactiveLayer = drawContext.stage.getLayer('_builtin_interactive');
|
|
19220
|
-
if (interactiveLayer) {
|
|
19221
|
-
interactiveLayer.add(this.poptipComponent);
|
|
19222
|
-
}
|
|
19223
|
-
}
|
|
19224
|
-
else if (graphic._showPoptip === 2) {
|
|
19225
|
-
graphic._showPoptip = 0;
|
|
19226
|
-
this.poptipComponent &&
|
|
19227
|
-
this.poptipComponent.setAttributes({
|
|
19228
|
-
visibleAll: false
|
|
19229
|
-
});
|
|
19230
|
-
}
|
|
19231
|
-
}
|
|
19232
|
-
};
|
|
19233
|
-
PopTipRenderContribution = __decorate$m([
|
|
19234
|
-
injectable()
|
|
19235
|
-
], PopTipRenderContribution);
|
|
19236
18983
|
|
|
19237
|
-
|
|
19238
|
-
|
|
19239
|
-
|
|
19240
|
-
|
|
19241
|
-
|
|
19242
|
-
this.key = this.name + this._uid;
|
|
19243
|
-
this.poptip = (e) => {
|
|
19244
|
-
const graphic = e.target;
|
|
19245
|
-
if (graphic.isContainer || !graphic.attribute) {
|
|
19246
|
-
this.unpoptip(e);
|
|
19247
|
-
return;
|
|
19248
|
-
}
|
|
19249
|
-
if (graphic === this.activeGraphic) {
|
|
19250
|
-
return;
|
|
19251
|
-
}
|
|
19252
|
-
const { poptip } = graphic.attribute;
|
|
19253
|
-
if (poptip) {
|
|
19254
|
-
graphic.setAttributes({});
|
|
19255
|
-
graphic._showPoptip = 1;
|
|
19256
|
-
}
|
|
19257
|
-
if (this.activeGraphic) {
|
|
19258
|
-
this.activeGraphic.setAttributes({});
|
|
19259
|
-
this.activeGraphic._showPoptip = 2;
|
|
19260
|
-
}
|
|
19261
|
-
this.setActiveGraphic(graphic, true);
|
|
19262
|
-
};
|
|
19263
|
-
this.unpoptip = (e) => {
|
|
19264
|
-
if (!this.activeGraphic) {
|
|
19265
|
-
return;
|
|
19266
|
-
}
|
|
19267
|
-
this.activeGraphic.setAttributes({});
|
|
19268
|
-
this.activeGraphic._showPoptip = 2;
|
|
19269
|
-
this.setActiveGraphic(null, true);
|
|
19270
|
-
};
|
|
19271
|
-
}
|
|
19272
|
-
activate(context) {
|
|
19273
|
-
this.pluginService = context;
|
|
19274
|
-
const { stage } = this.pluginService;
|
|
19275
|
-
stage.addEventListener('pointerover', this.poptip);
|
|
19276
|
-
}
|
|
19277
|
-
setActiveGraphic(graphic, rerender) {
|
|
19278
|
-
this.activeGraphic = graphic;
|
|
19279
|
-
this.pluginService.stage.renderNextFrame();
|
|
19280
|
-
}
|
|
19281
|
-
deactivate(context) {
|
|
19282
|
-
const { stage } = this.pluginService;
|
|
19283
|
-
stage.removeEventListener('pointerover', this.poptip);
|
|
19284
|
-
}
|
|
19285
|
-
};
|
|
19286
|
-
PopTipPlugin = __decorate$m([
|
|
19287
|
-
injectable()
|
|
19288
|
-
], PopTipPlugin);
|
|
19289
|
-
let PopTipForClipedTextPlugin = class PopTipForClipedTextPlugin {
|
|
19290
|
-
constructor() {
|
|
19291
|
-
this.name = 'poptipForText';
|
|
19292
|
-
this.activeEvent = 'onRegister';
|
|
19293
|
-
this._uid = Generator.GenAutoIncrementId();
|
|
19294
|
-
this.key = this.name + this._uid;
|
|
19295
|
-
this.pointerlave = (e) => {
|
|
19296
|
-
const { stage } = this.pluginService;
|
|
19297
|
-
if (e.target === stage) {
|
|
19298
|
-
this.unpoptip(e);
|
|
19299
|
-
}
|
|
19300
|
-
};
|
|
19301
|
-
this.poptip = (e) => {
|
|
19302
|
-
const graphic = e.target;
|
|
19303
|
-
if (graphic.type !== 'text' || !graphic.cliped || graphic.isContainer || !graphic.attribute) {
|
|
19304
|
-
this.unpoptip(e);
|
|
19305
|
-
return;
|
|
19306
|
-
}
|
|
19307
|
-
if (graphic === this.activeGraphic) {
|
|
19308
|
-
return;
|
|
19309
|
-
}
|
|
19310
|
-
const { poptip = {} } = graphic.attribute;
|
|
19311
|
-
if (poptip) {
|
|
19312
|
-
graphic.setAttributes({});
|
|
19313
|
-
graphic._showPoptip = 1;
|
|
19314
|
-
}
|
|
19315
|
-
if (this.activeGraphic) {
|
|
19316
|
-
this.activeGraphic.setAttributes({});
|
|
19317
|
-
this.activeGraphic._showPoptip = 2;
|
|
19318
|
-
}
|
|
19319
|
-
this.setActiveGraphic(graphic, true);
|
|
19320
|
-
};
|
|
19321
|
-
this.unpoptip = (e) => {
|
|
19322
|
-
if (!this.activeGraphic) {
|
|
19323
|
-
return;
|
|
19324
|
-
}
|
|
19325
|
-
this.activeGraphic.setAttributes({});
|
|
19326
|
-
this.activeGraphic._showPoptip = 2;
|
|
19327
|
-
this.setActiveGraphic(null, true);
|
|
19328
|
-
};
|
|
19329
|
-
}
|
|
19330
|
-
activate(context) {
|
|
19331
|
-
this.pluginService = context;
|
|
19332
|
-
const { stage } = this.pluginService;
|
|
19333
|
-
stage.addEventListener('pointerover', this.poptip);
|
|
19334
|
-
stage.addEventListener('pointerleave', this.pointerlave);
|
|
19335
|
-
}
|
|
19336
|
-
setActiveGraphic(graphic, rerender) {
|
|
19337
|
-
this.activeGraphic = graphic;
|
|
19338
|
-
this.pluginService.stage.renderNextFrame();
|
|
19339
|
-
}
|
|
19340
|
-
deactivate(context) {
|
|
19341
|
-
const { stage } = this.pluginService;
|
|
19342
|
-
stage.removeEventListener('pointerover', this.poptip);
|
|
19343
|
-
stage.removeEventListener('pointerleave', this.pointerlave);
|
|
19344
|
-
}
|
|
19345
|
-
};
|
|
19346
|
-
PopTipForClipedTextPlugin = __decorate$m([
|
|
19347
|
-
injectable()
|
|
19348
|
-
], PopTipForClipedTextPlugin);
|
|
19349
|
-
|
|
19350
|
-
const popTipModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
19351
|
-
if (!isBound(PopTipRenderContribution)) {
|
|
19352
|
-
bind(PopTipRenderContribution).toSelf().inSingletonScope();
|
|
19353
|
-
bind(InteractiveSubRenderContribution).toService(PopTipRenderContribution);
|
|
19354
|
-
}
|
|
19355
|
-
if (!isBound(PopTipPlugin)) {
|
|
19356
|
-
bind(PopTipPlugin).toSelf();
|
|
19357
|
-
bind(AutoEnablePlugins).toService(PopTipPlugin);
|
|
19358
|
-
}
|
|
19359
|
-
if (!isBound(PopTipForClipedTextPlugin)) {
|
|
19360
|
-
bind(PopTipForClipedTextPlugin).toSelf();
|
|
19361
|
-
bind(AutoEnablePlugins).toService(PopTipForClipedTextPlugin);
|
|
19362
|
-
}
|
|
19363
|
-
});
|
|
19364
|
-
function loadPoptip() {
|
|
19365
|
-
container.load(popTipModule);
|
|
19366
|
-
}
|
|
19367
|
-
function loadPoptipComponent() {
|
|
19368
|
-
registerGroup();
|
|
19369
|
-
registerWrapText();
|
|
19370
|
-
registerSymbol();
|
|
19371
|
-
registerRect();
|
|
19372
|
-
}
|
|
19373
|
-
function setPoptipTheme(defaultPoptipTheme) {
|
|
19374
|
-
vutils.merge(theme.poptip, DEFAULT_THEME, defaultPoptipTheme);
|
|
19375
|
-
}
|
|
19376
|
-
|
|
19377
|
-
const _tBounds = new vutils.AABBBounds();
|
|
19378
|
-
loadPoptipComponent();
|
|
19379
|
-
class PopTip extends AbstractComponent {
|
|
19380
|
-
constructor(attributes, options) {
|
|
19381
|
-
super((options === null || options === void 0 ? void 0 : options.skipDefault) ? attributes : vutils.merge({}, PopTip.defaultAttributes, attributes));
|
|
18984
|
+
const _tBounds = new vutils.AABBBounds();
|
|
18985
|
+
loadPoptipComponent();
|
|
18986
|
+
class PopTip extends AbstractComponent {
|
|
18987
|
+
constructor(attributes, options) {
|
|
18988
|
+
super((options === null || options === void 0 ? void 0 : options.skipDefault) ? attributes : vutils.merge({}, PopTip.defaultAttributes, attributes));
|
|
19382
18989
|
this.name = 'poptip';
|
|
19383
18990
|
this.positionList = ['top', 'tl', 'tr', 'bottom', 'bl', 'br', 'left', 'lt', 'lb', 'right', 'rt', 'rb'];
|
|
19384
18991
|
}
|
|
@@ -19561,6 +19168,189 @@
|
|
|
19561
19168
|
padding: 10
|
|
19562
19169
|
};
|
|
19563
19170
|
|
|
19171
|
+
function wrapPoptip(target, source) {
|
|
19172
|
+
vutils.merge(target, theme.poptip, source);
|
|
19173
|
+
return target;
|
|
19174
|
+
}
|
|
19175
|
+
let PopTipRenderContribution = class PopTipRenderContribution {
|
|
19176
|
+
render(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
|
|
19177
|
+
var _a;
|
|
19178
|
+
if (graphic._showPoptip === 1) {
|
|
19179
|
+
const { visible, visibleCb } = graphic.attribute.poptip || {};
|
|
19180
|
+
if (visible === false || (visibleCb && visibleCb(graphic) === false)) {
|
|
19181
|
+
return;
|
|
19182
|
+
}
|
|
19183
|
+
const attribute = {};
|
|
19184
|
+
vutils.merge(attribute, PopTip.defaultAttributes, graphic.attribute.poptip ? graphic.attribute.poptip : {});
|
|
19185
|
+
if (!this.poptipComponent) {
|
|
19186
|
+
this.poptipComponent = new PopTip(attribute);
|
|
19187
|
+
}
|
|
19188
|
+
else {
|
|
19189
|
+
this.poptipComponent.initAttributes(attribute);
|
|
19190
|
+
}
|
|
19191
|
+
let poptip = graphic.attribute.poptip || {};
|
|
19192
|
+
if (graphic.type === 'text' && poptip.title == null && poptip.content == null) {
|
|
19193
|
+
const out = {};
|
|
19194
|
+
wrapPoptip(out, poptip);
|
|
19195
|
+
poptip = out;
|
|
19196
|
+
poptip.content = (_a = poptip.content) !== null && _a !== void 0 ? _a : graphic.attribute.text;
|
|
19197
|
+
}
|
|
19198
|
+
const matrix = graphic.globalTransMatrix;
|
|
19199
|
+
this.poptipComponent.setAttributes(Object.assign(Object.assign({ visibleAll: true, pickable: false, childrenPickable: false }, poptip), { x: matrix.e, y: matrix.f }));
|
|
19200
|
+
drawContext.stage.tryInitInteractiveLayer();
|
|
19201
|
+
const interactiveLayer = drawContext.stage.getLayer('_builtin_interactive');
|
|
19202
|
+
if (interactiveLayer) {
|
|
19203
|
+
interactiveLayer.add(this.poptipComponent);
|
|
19204
|
+
}
|
|
19205
|
+
}
|
|
19206
|
+
else if (graphic._showPoptip === 2) {
|
|
19207
|
+
graphic._showPoptip = 0;
|
|
19208
|
+
this.poptipComponent &&
|
|
19209
|
+
this.poptipComponent.setAttributes({
|
|
19210
|
+
visibleAll: false
|
|
19211
|
+
});
|
|
19212
|
+
}
|
|
19213
|
+
}
|
|
19214
|
+
};
|
|
19215
|
+
PopTipRenderContribution = __decorate([
|
|
19216
|
+
injectable()
|
|
19217
|
+
], PopTipRenderContribution);
|
|
19218
|
+
|
|
19219
|
+
let PopTipPlugin = class PopTipPlugin {
|
|
19220
|
+
constructor() {
|
|
19221
|
+
this.name = 'poptip';
|
|
19222
|
+
this.activeEvent = 'onRegister';
|
|
19223
|
+
this._uid = Generator.GenAutoIncrementId();
|
|
19224
|
+
this.key = this.name + this._uid;
|
|
19225
|
+
this.poptip = (e) => {
|
|
19226
|
+
const graphic = e.target;
|
|
19227
|
+
if (graphic.isContainer || !graphic.attribute) {
|
|
19228
|
+
this.unpoptip(e);
|
|
19229
|
+
return;
|
|
19230
|
+
}
|
|
19231
|
+
if (graphic === this.activeGraphic) {
|
|
19232
|
+
return;
|
|
19233
|
+
}
|
|
19234
|
+
const { poptip } = graphic.attribute;
|
|
19235
|
+
if (poptip) {
|
|
19236
|
+
graphic.setAttributes({});
|
|
19237
|
+
graphic._showPoptip = 1;
|
|
19238
|
+
}
|
|
19239
|
+
if (this.activeGraphic) {
|
|
19240
|
+
this.activeGraphic.setAttributes({});
|
|
19241
|
+
this.activeGraphic._showPoptip = 2;
|
|
19242
|
+
}
|
|
19243
|
+
this.setActiveGraphic(graphic, true);
|
|
19244
|
+
};
|
|
19245
|
+
this.unpoptip = (e) => {
|
|
19246
|
+
if (!this.activeGraphic) {
|
|
19247
|
+
return;
|
|
19248
|
+
}
|
|
19249
|
+
this.activeGraphic.setAttributes({});
|
|
19250
|
+
this.activeGraphic._showPoptip = 2;
|
|
19251
|
+
this.setActiveGraphic(null, true);
|
|
19252
|
+
};
|
|
19253
|
+
}
|
|
19254
|
+
activate(context) {
|
|
19255
|
+
this.pluginService = context;
|
|
19256
|
+
const { stage } = this.pluginService;
|
|
19257
|
+
stage.addEventListener('pointerover', this.poptip);
|
|
19258
|
+
}
|
|
19259
|
+
setActiveGraphic(graphic, rerender) {
|
|
19260
|
+
this.activeGraphic = graphic;
|
|
19261
|
+
this.pluginService.stage.renderNextFrame();
|
|
19262
|
+
}
|
|
19263
|
+
deactivate(context) {
|
|
19264
|
+
const { stage } = this.pluginService;
|
|
19265
|
+
stage.removeEventListener('pointerover', this.poptip);
|
|
19266
|
+
}
|
|
19267
|
+
};
|
|
19268
|
+
PopTipPlugin = __decorate([
|
|
19269
|
+
injectable()
|
|
19270
|
+
], PopTipPlugin);
|
|
19271
|
+
let PopTipForClipedTextPlugin = class PopTipForClipedTextPlugin {
|
|
19272
|
+
constructor() {
|
|
19273
|
+
this.name = 'poptipForText';
|
|
19274
|
+
this.activeEvent = 'onRegister';
|
|
19275
|
+
this._uid = Generator.GenAutoIncrementId();
|
|
19276
|
+
this.key = this.name + this._uid;
|
|
19277
|
+
this.pointerlave = (e) => {
|
|
19278
|
+
const { stage } = this.pluginService;
|
|
19279
|
+
if (e.target === stage) {
|
|
19280
|
+
this.unpoptip(e);
|
|
19281
|
+
}
|
|
19282
|
+
};
|
|
19283
|
+
this.poptip = (e) => {
|
|
19284
|
+
const graphic = e.target;
|
|
19285
|
+
if (graphic.type !== 'text' ||
|
|
19286
|
+
!graphic.cliped ||
|
|
19287
|
+
graphic.isContainer ||
|
|
19288
|
+
!graphic.attribute ||
|
|
19289
|
+
graphic.attribute.disableAutoClipedPoptip) {
|
|
19290
|
+
this.unpoptip(e);
|
|
19291
|
+
return;
|
|
19292
|
+
}
|
|
19293
|
+
if (graphic === this.activeGraphic) {
|
|
19294
|
+
return;
|
|
19295
|
+
}
|
|
19296
|
+
const { poptip = {} } = graphic.attribute;
|
|
19297
|
+
if (poptip) {
|
|
19298
|
+
graphic.setAttributes({});
|
|
19299
|
+
graphic._showPoptip = 1;
|
|
19300
|
+
}
|
|
19301
|
+
if (this.activeGraphic) {
|
|
19302
|
+
this.activeGraphic.setAttributes({});
|
|
19303
|
+
this.activeGraphic._showPoptip = 2;
|
|
19304
|
+
}
|
|
19305
|
+
this.setActiveGraphic(graphic, true);
|
|
19306
|
+
};
|
|
19307
|
+
this.unpoptip = (e) => {
|
|
19308
|
+
if (!this.activeGraphic) {
|
|
19309
|
+
return;
|
|
19310
|
+
}
|
|
19311
|
+
this.activeGraphic.setAttributes({});
|
|
19312
|
+
this.activeGraphic._showPoptip = 2;
|
|
19313
|
+
this.setActiveGraphic(null, true);
|
|
19314
|
+
};
|
|
19315
|
+
}
|
|
19316
|
+
activate(context) {
|
|
19317
|
+
this.pluginService = context;
|
|
19318
|
+
const { stage } = this.pluginService;
|
|
19319
|
+
stage.addEventListener('pointerover', this.poptip);
|
|
19320
|
+
stage.addEventListener('pointerleave', this.pointerlave);
|
|
19321
|
+
}
|
|
19322
|
+
setActiveGraphic(graphic, rerender) {
|
|
19323
|
+
this.activeGraphic = graphic;
|
|
19324
|
+
this.pluginService.stage.renderNextFrame();
|
|
19325
|
+
}
|
|
19326
|
+
deactivate(context) {
|
|
19327
|
+
const { stage } = this.pluginService;
|
|
19328
|
+
stage.removeEventListener('pointerover', this.poptip);
|
|
19329
|
+
stage.removeEventListener('pointerleave', this.pointerlave);
|
|
19330
|
+
}
|
|
19331
|
+
};
|
|
19332
|
+
PopTipForClipedTextPlugin = __decorate([
|
|
19333
|
+
injectable()
|
|
19334
|
+
], PopTipForClipedTextPlugin);
|
|
19335
|
+
|
|
19336
|
+
const popTipModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
19337
|
+
if (!isBound(PopTipRenderContribution)) {
|
|
19338
|
+
bind(PopTipRenderContribution).toSelf().inSingletonScope();
|
|
19339
|
+
bind(InteractiveSubRenderContribution).toService(PopTipRenderContribution);
|
|
19340
|
+
}
|
|
19341
|
+
if (!isBound(PopTipPlugin)) {
|
|
19342
|
+
bind(PopTipPlugin).toSelf();
|
|
19343
|
+
bind(AutoEnablePlugins).toService(PopTipPlugin);
|
|
19344
|
+
}
|
|
19345
|
+
if (!isBound(PopTipForClipedTextPlugin)) {
|
|
19346
|
+
bind(PopTipForClipedTextPlugin).toSelf();
|
|
19347
|
+
bind(AutoEnablePlugins).toService(PopTipForClipedTextPlugin);
|
|
19348
|
+
}
|
|
19349
|
+
});
|
|
19350
|
+
function loadPoptip() {
|
|
19351
|
+
container.load(popTipModule);
|
|
19352
|
+
}
|
|
19353
|
+
|
|
19564
19354
|
class CrosshairBase extends AbstractComponent {
|
|
19565
19355
|
constructor() {
|
|
19566
19356
|
super(...arguments);
|
|
@@ -20724,12 +20514,13 @@
|
|
|
20724
20514
|
this.add(labelLine);
|
|
20725
20515
|
}
|
|
20726
20516
|
this._syncStateWithRelatedGraphic(relatedGraphic);
|
|
20727
|
-
|
|
20728
|
-
|
|
20729
|
-
|
|
20730
|
-
|
|
20731
|
-
|
|
20732
|
-
|
|
20517
|
+
this._animationConfig.enter.duration > 0 &&
|
|
20518
|
+
relatedGraphic.once('animate-bind', a => {
|
|
20519
|
+
text.setAttributes(from);
|
|
20520
|
+
labelLine && labelLine.setAttributes(from);
|
|
20521
|
+
const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to, this._animationConfig.enter);
|
|
20522
|
+
relatedGraphic.on('afterAttributeUpdate', listener);
|
|
20523
|
+
});
|
|
20733
20524
|
}
|
|
20734
20525
|
}
|
|
20735
20526
|
else if (state === 'update') {
|
|
@@ -29922,7 +29713,7 @@
|
|
|
29922
29713
|
}
|
|
29923
29714
|
};
|
|
29924
29715
|
|
|
29925
|
-
const version = "0.17.5
|
|
29716
|
+
const version = "0.17.5";
|
|
29926
29717
|
|
|
29927
29718
|
exports.AbstractComponent = AbstractComponent;
|
|
29928
29719
|
exports.ArcInfo = ArcInfo;
|