@visactor/vrender 0.14.0-alpha.9 → 0.14.1-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/cjs/common/text.d.ts +1 -1
- package/cjs/common/text.js +2 -2
- package/cjs/common/text.js.map +1 -1
- package/cjs/common/utils.js +1 -1
- package/cjs/common/utils.js.map +1 -1
- package/cjs/constants.d.ts +1 -1
- package/cjs/constants.js +2 -2
- package/cjs/constants.js.map +1 -1
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.js +1 -1
- package/cjs/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
- package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js +1 -1
- package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
- package/cjs/core/contributions/window/browser-contribution.js +1 -1
- package/cjs/core/contributions/window/browser-contribution.js.map +1 -1
- package/cjs/core/contributions/window/feishu-contribution.js +1 -1
- package/cjs/core/contributions/window/feishu-contribution.js.map +1 -1
- package/cjs/core/contributions/window/lynx-contribution.js +1 -1
- package/cjs/core/contributions/window/lynx-contribution.js.map +1 -1
- package/cjs/core/contributions/window/native-contribution.js.map +1 -1
- package/cjs/core/contributions/window/node-contribution.js +1 -1
- package/cjs/core/contributions/window/node-contribution.js.map +1 -1
- package/cjs/core/contributions/window/taro-contribution.js +1 -1
- package/cjs/core/contributions/window/taro-contribution.js.map +1 -1
- package/cjs/core/contributions/window/wx-contribution.js +1 -1
- package/cjs/core/contributions/window/wx-contribution.js.map +1 -1
- package/cjs/core/core-modules.js +2 -2
- package/cjs/core/core-modules.js.map +1 -1
- package/cjs/core/global-module.d.ts +1 -5
- package/cjs/core/global-module.js +1 -20
- package/cjs/core/global-module.js.map +1 -1
- package/cjs/core/global.d.ts +2 -0
- package/cjs/core/global.js +6 -0
- package/cjs/core/global.js.map +1 -1
- package/cjs/core/graphic-utils.js +1 -1
- package/cjs/core/graphic-utils.js.map +1 -1
- package/cjs/core/layer-service.js +1 -1
- package/cjs/core/layer-service.js.map +1 -1
- package/cjs/core/stage.js +2 -2
- package/cjs/core/stage.js.map +1 -1
- package/cjs/core/window.d.ts +1 -1
- package/cjs/core/window.js +3 -3
- package/cjs/core/window.js.map +1 -1
- package/cjs/graphic/text.js +7 -4
- package/cjs/graphic/text.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/interface/global.d.ts +2 -0
- package/cjs/interface/global.js.map +1 -1
- package/cjs/modules.d.ts +1 -1
- package/cjs/modules.js +3 -3
- package/cjs/modules.js.map +1 -1
- package/cjs/picker/canvas-picker-service.js +1 -1
- package/cjs/picker/canvas-picker-service.js.map +1 -1
- package/cjs/picker/global-picker-service.js +1 -1
- package/cjs/picker/global-picker-service.js.map +1 -1
- package/cjs/picker/math-picker-service.js +1 -1
- package/cjs/picker/math-picker-service.js.map +1 -1
- package/cjs/picker/picker-service.js +1 -1
- package/cjs/picker/picker-service.js.map +1 -1
- package/cjs/render/contributions/render/incremental-draw-contribution.js +1 -1
- package/cjs/render/contributions/render/incremental-draw-contribution.js.map +1 -1
- package/dist/index.js +82 -65
- package/dist/index.min.js +1 -1
- package/es/common/text.d.ts +1 -1
- package/es/common/text.js +2 -2
- package/es/common/text.js.map +1 -1
- package/es/common/utils.js +1 -1
- package/es/common/utils.js.map +1 -1
- package/es/constants.d.ts +1 -1
- package/es/constants.js +1 -1
- package/es/constants.js.map +1 -1
- package/es/core/contributions/layerHandler/canvas2d-contribution.js +2 -2
- package/es/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
- package/es/core/contributions/layerHandler/offscreen2d-contribution.js +2 -2
- package/es/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
- package/es/core/contributions/window/browser-contribution.js +2 -2
- package/es/core/contributions/window/browser-contribution.js.map +1 -1
- package/es/core/contributions/window/feishu-contribution.js +2 -2
- package/es/core/contributions/window/feishu-contribution.js.map +1 -1
- package/es/core/contributions/window/lynx-contribution.js +2 -2
- package/es/core/contributions/window/lynx-contribution.js.map +1 -1
- package/es/core/contributions/window/native-contribution.js.map +1 -1
- package/es/core/contributions/window/node-contribution.js +2 -2
- package/es/core/contributions/window/node-contribution.js.map +1 -1
- package/es/core/contributions/window/taro-contribution.js +2 -2
- package/es/core/contributions/window/taro-contribution.js.map +1 -1
- package/es/core/contributions/window/wx-contribution.js +2 -2
- package/es/core/contributions/window/wx-contribution.js.map +1 -1
- package/es/core/core-modules.js +4 -4
- package/es/core/core-modules.js.map +1 -1
- package/es/core/global-module.d.ts +1 -5
- package/es/core/global-module.js +1 -20
- package/es/core/global-module.js.map +1 -1
- package/es/core/global.d.ts +2 -0
- package/es/core/global.js +6 -0
- package/es/core/global.js.map +1 -1
- package/es/core/graphic-utils.js +2 -2
- package/es/core/graphic-utils.js.map +1 -1
- package/es/core/layer-service.js +2 -2
- package/es/core/layer-service.js.map +1 -1
- package/es/core/stage.js +4 -4
- package/es/core/stage.js.map +1 -1
- package/es/core/window.d.ts +1 -1
- package/es/core/window.js +3 -3
- package/es/core/window.js.map +1 -1
- package/es/graphic/text.js +8 -3
- package/es/graphic/text.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/interface/global.d.ts +2 -0
- package/es/interface/global.js.map +1 -1
- package/es/modules.d.ts +1 -1
- package/es/modules.js +3 -3
- package/es/modules.js.map +1 -1
- package/es/picker/canvas-picker-service.js +2 -2
- package/es/picker/canvas-picker-service.js.map +1 -1
- package/es/picker/global-picker-service.js +2 -2
- package/es/picker/global-picker-service.js.map +1 -1
- package/es/picker/math-picker-service.js +2 -2
- package/es/picker/math-picker-service.js.map +1 -1
- package/es/picker/picker-service.js +2 -2
- package/es/picker/picker-service.js.map +1 -1
- package/es/render/contributions/render/incremental-draw-contribution.js +2 -2
- package/es/render/contributions/render/incremental-draw-contribution.js.map +1 -1
- package/es/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
};
|
|
130
130
|
|
|
131
131
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
132
|
-
var global$
|
|
132
|
+
var global$d =
|
|
133
133
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
134
134
|
check((typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) == 'object' && globalThis) || check((typeof window === "undefined" ? "undefined" : _typeof(window)) == 'object' && window) ||
|
|
135
135
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
@@ -287,13 +287,13 @@
|
|
|
287
287
|
return _typeof(it) == 'object' ? it !== null : isCallable$h(it);
|
|
288
288
|
};
|
|
289
289
|
|
|
290
|
-
var global$
|
|
290
|
+
var global$c = global$d;
|
|
291
291
|
var isCallable$g = isCallable$i;
|
|
292
292
|
var aFunction = function aFunction(argument) {
|
|
293
293
|
return isCallable$g(argument) ? argument : undefined;
|
|
294
294
|
};
|
|
295
295
|
var getBuiltIn$6 = function getBuiltIn(namespace, method) {
|
|
296
|
-
return arguments.length < 2 ? aFunction(global$
|
|
296
|
+
return arguments.length < 2 ? aFunction(global$c[namespace]) : global$c[namespace] && global$c[namespace][method];
|
|
297
297
|
};
|
|
298
298
|
|
|
299
299
|
var uncurryThis$k = functionUncurryThis;
|
|
@@ -301,10 +301,10 @@
|
|
|
301
301
|
|
|
302
302
|
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
303
303
|
|
|
304
|
-
var global$
|
|
304
|
+
var global$b = global$d;
|
|
305
305
|
var userAgent = engineUserAgent;
|
|
306
|
-
var process = global$
|
|
307
|
-
var Deno = global$
|
|
306
|
+
var process = global$b.process;
|
|
307
|
+
var Deno = global$b.Deno;
|
|
308
308
|
var versions = process && process.versions || Deno && Deno.version;
|
|
309
309
|
var v8 = versions && versions.v8;
|
|
310
310
|
var match, version$1;
|
|
@@ -329,8 +329,8 @@
|
|
|
329
329
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
330
330
|
var V8_VERSION = engineV8Version;
|
|
331
331
|
var fails$c = fails$g;
|
|
332
|
-
var global$
|
|
333
|
-
var $String$4 = global$
|
|
332
|
+
var global$a = global$d;
|
|
333
|
+
var $String$4 = global$a.String;
|
|
334
334
|
|
|
335
335
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
336
336
|
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$c(function () {
|
|
@@ -405,27 +405,27 @@
|
|
|
405
405
|
|
|
406
406
|
var shared$4 = {exports: {}};
|
|
407
407
|
|
|
408
|
-
var global$
|
|
408
|
+
var global$9 = global$d;
|
|
409
409
|
|
|
410
410
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
411
411
|
var defineProperty$4 = Object.defineProperty;
|
|
412
412
|
var defineGlobalProperty$3 = function defineGlobalProperty(key, value) {
|
|
413
413
|
try {
|
|
414
|
-
defineProperty$4(global$
|
|
414
|
+
defineProperty$4(global$9, key, {
|
|
415
415
|
value: value,
|
|
416
416
|
configurable: true,
|
|
417
417
|
writable: true
|
|
418
418
|
});
|
|
419
419
|
} catch (error) {
|
|
420
|
-
global$
|
|
420
|
+
global$9[key] = value;
|
|
421
421
|
}
|
|
422
422
|
return value;
|
|
423
423
|
};
|
|
424
424
|
|
|
425
|
-
var global$
|
|
425
|
+
var global$8 = global$d;
|
|
426
426
|
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
427
427
|
var SHARED = '__core-js_shared__';
|
|
428
|
-
var store$5 = global$
|
|
428
|
+
var store$5 = global$8[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
429
429
|
var sharedStore = store$5;
|
|
430
430
|
|
|
431
431
|
var store$4 = sharedStore;
|
|
@@ -468,13 +468,13 @@
|
|
|
468
468
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id$3 + postfix, 36);
|
|
469
469
|
};
|
|
470
470
|
|
|
471
|
-
var global$
|
|
471
|
+
var global$7 = global$d;
|
|
472
472
|
var shared$3 = sharedExports;
|
|
473
473
|
var hasOwn$a = hasOwnProperty_1;
|
|
474
474
|
var uid$2 = uid$3;
|
|
475
475
|
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
476
476
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
477
|
-
var _Symbol = global$
|
|
477
|
+
var _Symbol = global$7.Symbol;
|
|
478
478
|
var WellKnownSymbolsStore = shared$3('wks');
|
|
479
479
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? _Symbol['for'] || _Symbol : _Symbol && _Symbol.withoutSetter || uid$2;
|
|
480
480
|
var wellKnownSymbol$b = function wellKnownSymbol(name) {
|
|
@@ -519,9 +519,9 @@
|
|
|
519
519
|
return isSymbol(key) ? key : key + '';
|
|
520
520
|
};
|
|
521
521
|
|
|
522
|
-
var global$
|
|
522
|
+
var global$6 = global$d;
|
|
523
523
|
var isObject$b = isObject$e;
|
|
524
|
-
var document$1 = global$
|
|
524
|
+
var document$1 = global$6.document;
|
|
525
525
|
// typeof document.createElement is 'object' in old IE
|
|
526
526
|
var EXISTS$1 = isObject$b(document$1) && isObject$b(document$1.createElement);
|
|
527
527
|
var documentCreateElement$1 = function documentCreateElement(it) {
|
|
@@ -674,9 +674,9 @@
|
|
|
674
674
|
}
|
|
675
675
|
var inspectSource$2 = store$3.inspectSource;
|
|
676
676
|
|
|
677
|
-
var global$
|
|
677
|
+
var global$5 = global$d;
|
|
678
678
|
var isCallable$b = isCallable$i;
|
|
679
|
-
var WeakMap$2 = global$
|
|
679
|
+
var WeakMap$2 = global$5.WeakMap;
|
|
680
680
|
var weakMapBasicDetection = isCallable$b(WeakMap$2) && /native code/.test(String(WeakMap$2));
|
|
681
681
|
|
|
682
682
|
var shared$2 = sharedExports;
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
var hiddenKeys$5 = {};
|
|
690
690
|
|
|
691
691
|
var NATIVE_WEAK_MAP$1 = weakMapBasicDetection;
|
|
692
|
-
var global$
|
|
692
|
+
var global$4 = global$d;
|
|
693
693
|
var isObject$9 = isObject$e;
|
|
694
694
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
|
|
695
695
|
var hasOwn$7 = hasOwnProperty_1;
|
|
@@ -697,8 +697,8 @@
|
|
|
697
697
|
var sharedKey$2 = sharedKey$3;
|
|
698
698
|
var hiddenKeys$4 = hiddenKeys$5;
|
|
699
699
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
700
|
-
var TypeError$1 = global$
|
|
701
|
-
var WeakMap$1 = global$
|
|
700
|
+
var TypeError$1 = global$4.TypeError;
|
|
701
|
+
var WeakMap$1 = global$4.WeakMap;
|
|
702
702
|
var set, get$1, has$1;
|
|
703
703
|
var enforce = function enforce(it) {
|
|
704
704
|
return has$1(it) ? get$1(it) : set(it, {});
|
|
@@ -1009,7 +1009,7 @@
|
|
|
1009
1009
|
var POLYFILL = isForced$2.POLYFILL = 'P';
|
|
1010
1010
|
var isForced_1 = isForced$2;
|
|
1011
1011
|
|
|
1012
|
-
var global$
|
|
1012
|
+
var global$3 = global$d;
|
|
1013
1013
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
1014
1014
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
|
|
1015
1015
|
var defineBuiltIn$4 = defineBuiltIn$5;
|
|
@@ -1038,11 +1038,11 @@
|
|
|
1038
1038
|
var STATIC = options.stat;
|
|
1039
1039
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1040
1040
|
if (GLOBAL) {
|
|
1041
|
-
target = global$
|
|
1041
|
+
target = global$3;
|
|
1042
1042
|
} else if (STATIC) {
|
|
1043
|
-
target = global$
|
|
1043
|
+
target = global$3[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1044
1044
|
} else {
|
|
1045
|
-
target = (global$
|
|
1045
|
+
target = (global$3[TARGET] || {}).prototype;
|
|
1046
1046
|
}
|
|
1047
1047
|
if (target) for (key in source) {
|
|
1048
1048
|
sourceProperty = source[key];
|
|
@@ -1543,7 +1543,7 @@
|
|
|
1543
1543
|
};
|
|
1544
1544
|
|
|
1545
1545
|
var $$a = _export;
|
|
1546
|
-
var global$
|
|
1546
|
+
var global$2 = global$d;
|
|
1547
1547
|
var uncurryThis$9 = functionUncurryThis;
|
|
1548
1548
|
var isForced = isForced_1;
|
|
1549
1549
|
var defineBuiltIn$3 = defineBuiltIn$5;
|
|
@@ -1561,7 +1561,7 @@
|
|
|
1561
1561
|
var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
|
|
1562
1562
|
var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
|
|
1563
1563
|
var ADDER = IS_MAP ? 'set' : 'add';
|
|
1564
|
-
var NativeConstructor = global$
|
|
1564
|
+
var NativeConstructor = global$2[CONSTRUCTOR_NAME];
|
|
1565
1565
|
var NativePrototype = NativeConstructor && NativeConstructor.prototype;
|
|
1566
1566
|
var Constructor = NativeConstructor;
|
|
1567
1567
|
var exported = {};
|
|
@@ -2507,7 +2507,7 @@
|
|
|
2507
2507
|
};
|
|
2508
2508
|
|
|
2509
2509
|
var FREEZING = freezing;
|
|
2510
|
-
var global$
|
|
2510
|
+
var global$1 = global$d;
|
|
2511
2511
|
var uncurryThis$5 = functionUncurryThis;
|
|
2512
2512
|
var defineBuiltIns = defineBuiltIns$3;
|
|
2513
2513
|
var InternalMetadataModule = internalMetadataExports;
|
|
@@ -2532,7 +2532,7 @@
|
|
|
2532
2532
|
var seal = $Object.seal;
|
|
2533
2533
|
var FROZEN = {};
|
|
2534
2534
|
var SEALED = {};
|
|
2535
|
-
var IS_IE11 = !global$
|
|
2535
|
+
var IS_IE11 = !global$1.ActiveXObject && 'ActiveXObject' in global$1;
|
|
2536
2536
|
var InternalWeakMap;
|
|
2537
2537
|
var wrapper = function wrapper(init) {
|
|
2538
2538
|
return function WeakMap() {
|
|
@@ -6021,7 +6021,7 @@
|
|
|
6021
6021
|
}
|
|
6022
6022
|
|
|
6023
6023
|
const EnvContribution = Symbol.for('EnvContribution');
|
|
6024
|
-
const
|
|
6024
|
+
const VGlobal = Symbol.for('VGlobal');
|
|
6025
6025
|
|
|
6026
6026
|
const defaultEnv = 'browser';
|
|
6027
6027
|
exports.DefaultGlobal = class DefaultGlobal {
|
|
@@ -6239,6 +6239,18 @@
|
|
|
6239
6239
|
}
|
|
6240
6240
|
return this.envContribution.loadBlob(url);
|
|
6241
6241
|
}
|
|
6242
|
+
isChrome() {
|
|
6243
|
+
if (!this._env) {
|
|
6244
|
+
this.setEnv('browser');
|
|
6245
|
+
}
|
|
6246
|
+
return this._env === 'browser' && navigator.userAgent.indexOf('Chrome') > -1;
|
|
6247
|
+
}
|
|
6248
|
+
isSafari() {
|
|
6249
|
+
if (!this._env) {
|
|
6250
|
+
this.setEnv('browser');
|
|
6251
|
+
}
|
|
6252
|
+
return this._env === 'browser' && /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent);
|
|
6253
|
+
}
|
|
6242
6254
|
};
|
|
6243
6255
|
exports.DefaultGlobal = __decorate([
|
|
6244
6256
|
injectable(),
|
|
@@ -10659,7 +10671,7 @@
|
|
|
10659
10671
|
injectable(),
|
|
10660
10672
|
__param(0, inject(ContributionProvider)),
|
|
10661
10673
|
__param(0, named(TextMeasureContribution)),
|
|
10662
|
-
__param(1, inject(
|
|
10674
|
+
__param(1, inject(VGlobal)),
|
|
10663
10675
|
__metadata("design:paramtypes", [Object, Object])
|
|
10664
10676
|
], exports.DefaultGraphicUtil);
|
|
10665
10677
|
var TransformMode;
|
|
@@ -14587,7 +14599,7 @@
|
|
|
14587
14599
|
if (this.durations.length > this.durationsListThreshold) {
|
|
14588
14600
|
this.durations.shift();
|
|
14589
14601
|
}
|
|
14590
|
-
this.timeout = Math.max(this.durations.reduce((a, b) => a + b, 0) / this.durations.length, 1000 / 60);
|
|
14602
|
+
this.timeout = Math.min(Math.max(this.durations.reduce((a, b) => a + b, 0) / this.durations.length, 1000 / 60), 1000 / 30);
|
|
14591
14603
|
}
|
|
14592
14604
|
}
|
|
14593
14605
|
const rafBasedSto = new RafBasedSTO();
|
|
@@ -18738,11 +18750,11 @@
|
|
|
18738
18750
|
};
|
|
18739
18751
|
exports.DefaultLayerService = __decorate([
|
|
18740
18752
|
injectable(),
|
|
18741
|
-
__param(0, inject(
|
|
18753
|
+
__param(0, inject(VGlobal)),
|
|
18742
18754
|
__metadata("design:paramtypes", [Object])
|
|
18743
18755
|
], exports.DefaultLayerService);
|
|
18744
18756
|
|
|
18745
|
-
const
|
|
18757
|
+
const VWindow = Symbol.for('VWindow');
|
|
18746
18758
|
const WindowHandlerContribution = Symbol.for('WindowHandlerContribution');
|
|
18747
18759
|
exports.DefaultWindow = class DefaultWindow {
|
|
18748
18760
|
global;
|
|
@@ -18856,7 +18868,7 @@
|
|
|
18856
18868
|
], exports.DefaultWindow.prototype, "postInit", null);
|
|
18857
18869
|
exports.DefaultWindow = __decorate([
|
|
18858
18870
|
injectable(),
|
|
18859
|
-
__param(0, inject(
|
|
18871
|
+
__param(0, inject(VGlobal)),
|
|
18860
18872
|
__metadata("design:paramtypes", [Object])
|
|
18861
18873
|
], exports.DefaultWindow);
|
|
18862
18874
|
|
|
@@ -18866,9 +18878,9 @@
|
|
|
18866
18878
|
|
|
18867
18879
|
var coreModule = new ContainerModule(bind => {
|
|
18868
18880
|
bind(exports.DefaultGlobal).toSelf().inSingletonScope();
|
|
18869
|
-
bind(
|
|
18881
|
+
bind(VGlobal).toService(exports.DefaultGlobal);
|
|
18870
18882
|
bind(exports.DefaultWindow).to(exports.DefaultWindow);
|
|
18871
|
-
bind(
|
|
18883
|
+
bind(VWindow).toService(exports.DefaultWindow);
|
|
18872
18884
|
bind(exports.DefaultGraphicUtil).toSelf().inSingletonScope();
|
|
18873
18885
|
bind(GraphicUtil).toService(exports.DefaultGraphicUtil);
|
|
18874
18886
|
bind(exports.DefaultTransformUtil).toSelf().inSingletonScope();
|
|
@@ -19852,7 +19864,7 @@
|
|
|
19852
19864
|
}
|
|
19853
19865
|
return 0;
|
|
19854
19866
|
}
|
|
19855
|
-
function textLayoutOffsetY(baseline, lineHeight, fontSize) {
|
|
19867
|
+
function textLayoutOffsetY(baseline, lineHeight, fontSize, buf = 0) {
|
|
19856
19868
|
if (baseline === 'middle') {
|
|
19857
19869
|
return -lineHeight / 2;
|
|
19858
19870
|
}
|
|
@@ -19860,7 +19872,7 @@
|
|
|
19860
19872
|
return 0;
|
|
19861
19873
|
}
|
|
19862
19874
|
if (baseline === 'bottom') {
|
|
19863
|
-
return -lineHeight;
|
|
19875
|
+
return buf - lineHeight;
|
|
19864
19876
|
}
|
|
19865
19877
|
if (!baseline || baseline === 'alphabetic') {
|
|
19866
19878
|
if (!fontSize) {
|
|
@@ -20123,9 +20135,10 @@
|
|
|
20123
20135
|
const textMeasure = application.graphicUtil.textMeasure;
|
|
20124
20136
|
let width;
|
|
20125
20137
|
let str;
|
|
20126
|
-
const buf = 2;
|
|
20127
20138
|
const attribute = this.attribute;
|
|
20128
|
-
const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke,
|
|
20139
|
+
const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak } = attribute;
|
|
20140
|
+
const buf = Math.max(2, fontSize * 0.075);
|
|
20141
|
+
const { lineHeight = attribute.lineHeight ?? (attribute.fontSize || textTheme.fontSize) + buf } = attribute;
|
|
20129
20142
|
if (!this.shouldUpdateShape() && this.cache) {
|
|
20130
20143
|
width = this.cache.clipedWidth;
|
|
20131
20144
|
const dx = textDrawOffsetX(textAlign, width);
|
|
@@ -20158,8 +20171,12 @@
|
|
|
20158
20171
|
}
|
|
20159
20172
|
this.clearUpdateShapeTag();
|
|
20160
20173
|
const dx = textDrawOffsetX(textAlign, width);
|
|
20161
|
-
|
|
20162
|
-
|
|
20174
|
+
let lh = lineHeight;
|
|
20175
|
+
if (vglobal.isSafari()) {
|
|
20176
|
+
lh += fontSize * 0.2;
|
|
20177
|
+
}
|
|
20178
|
+
const dy = textLayoutOffsetY(textBaseline, lh, fontSize, buf);
|
|
20179
|
+
this._AABBBounds.set(dx, dy, dx + width, dy + lh);
|
|
20163
20180
|
if (stroke) {
|
|
20164
20181
|
this._AABBBounds.expand(lineWidth / 2);
|
|
20165
20182
|
}
|
|
@@ -28010,7 +28027,7 @@
|
|
|
28010
28027
|
};
|
|
28011
28028
|
exports.DefaultPickService = __decorate([
|
|
28012
28029
|
injectable(),
|
|
28013
|
-
__param(0, inject(
|
|
28030
|
+
__param(0, inject(VGlobal)),
|
|
28014
28031
|
__param(1, inject(ContributionProvider)),
|
|
28015
28032
|
__param(1, named(PickItemInterceptor)),
|
|
28016
28033
|
__metadata("design:paramtypes", [Object, Object])
|
|
@@ -28106,7 +28123,7 @@
|
|
|
28106
28123
|
};
|
|
28107
28124
|
exports.DefaultGlobalPickerService = __decorate([
|
|
28108
28125
|
injectable(),
|
|
28109
|
-
__param(0, inject(
|
|
28126
|
+
__param(0, inject(VGlobal)),
|
|
28110
28127
|
__metadata("design:paramtypes", [Object])
|
|
28111
28128
|
], exports.DefaultGlobalPickerService);
|
|
28112
28129
|
|
|
@@ -29451,7 +29468,7 @@
|
|
|
29451
29468
|
__param(10, inject(CanvasPolygonPicker)),
|
|
29452
29469
|
__param(11, inject(CanvasRichTextPicker)),
|
|
29453
29470
|
__param(12, inject(DrawContribution)),
|
|
29454
|
-
__param(13, inject(
|
|
29471
|
+
__param(13, inject(VGlobal)),
|
|
29455
29472
|
__param(14, inject(ContributionProvider)),
|
|
29456
29473
|
__param(14, named(PickItemInterceptor)),
|
|
29457
29474
|
__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object])
|
|
@@ -29776,7 +29793,7 @@
|
|
|
29776
29793
|
injectable(),
|
|
29777
29794
|
__param(0, inject(ContributionProvider)),
|
|
29778
29795
|
__param(0, named(MathPickerContribution)),
|
|
29779
|
-
__param(1, inject(
|
|
29796
|
+
__param(1, inject(VGlobal)),
|
|
29780
29797
|
__param(2, inject(ContributionProvider)),
|
|
29781
29798
|
__param(2, named(PickItemInterceptor)),
|
|
29782
29799
|
__metadata("design:paramtypes", [Object, Object, Object])
|
|
@@ -31014,7 +31031,7 @@
|
|
|
31014
31031
|
};
|
|
31015
31032
|
BrowserWindowHandlerContribution = __decorate([
|
|
31016
31033
|
injectable(),
|
|
31017
|
-
__param(0, inject(
|
|
31034
|
+
__param(0, inject(VGlobal)),
|
|
31018
31035
|
__metadata("design:paramtypes", [Object])
|
|
31019
31036
|
], BrowserWindowHandlerContribution);
|
|
31020
31037
|
|
|
@@ -31380,7 +31397,7 @@
|
|
|
31380
31397
|
};
|
|
31381
31398
|
FeishuWindowHandlerContribution = __decorate([
|
|
31382
31399
|
injectable(),
|
|
31383
|
-
__param(0, inject(
|
|
31400
|
+
__param(0, inject(VGlobal)),
|
|
31384
31401
|
__metadata("design:paramtypes", [Object])
|
|
31385
31402
|
], FeishuWindowHandlerContribution);
|
|
31386
31403
|
|
|
@@ -31793,7 +31810,7 @@
|
|
|
31793
31810
|
};
|
|
31794
31811
|
TaroWindowHandlerContribution = __decorate([
|
|
31795
31812
|
injectable(),
|
|
31796
|
-
__param(0, inject(
|
|
31813
|
+
__param(0, inject(VGlobal)),
|
|
31797
31814
|
__metadata("design:paramtypes", [Object])
|
|
31798
31815
|
], TaroWindowHandlerContribution);
|
|
31799
31816
|
|
|
@@ -32169,7 +32186,7 @@
|
|
|
32169
32186
|
};
|
|
32170
32187
|
LynxWindowHandlerContribution = __decorate([
|
|
32171
32188
|
injectable(),
|
|
32172
|
-
__param(0, inject(
|
|
32189
|
+
__param(0, inject(VGlobal)),
|
|
32173
32190
|
__metadata("design:paramtypes", [Object])
|
|
32174
32191
|
], LynxWindowHandlerContribution);
|
|
32175
32192
|
|
|
@@ -32438,7 +32455,7 @@
|
|
|
32438
32455
|
};
|
|
32439
32456
|
NodeWindowHandlerContribution = __decorate([
|
|
32440
32457
|
injectable(),
|
|
32441
|
-
__param(0, inject(
|
|
32458
|
+
__param(0, inject(VGlobal)),
|
|
32442
32459
|
__metadata("design:paramtypes", [Object])
|
|
32443
32460
|
], NodeWindowHandlerContribution);
|
|
32444
32461
|
|
|
@@ -32771,7 +32788,7 @@
|
|
|
32771
32788
|
};
|
|
32772
32789
|
WxWindowHandlerContribution = __decorate([
|
|
32773
32790
|
injectable(),
|
|
32774
|
-
__param(0, inject(
|
|
32791
|
+
__param(0, inject(VGlobal)),
|
|
32775
32792
|
__metadata("design:paramtypes", [Object])
|
|
32776
32793
|
], WxWindowHandlerContribution);
|
|
32777
32794
|
|
|
@@ -32912,7 +32929,7 @@
|
|
|
32912
32929
|
};
|
|
32913
32930
|
CanvasLayerHandlerContribution = __decorate([
|
|
32914
32931
|
injectable(),
|
|
32915
|
-
__param(0, inject(
|
|
32932
|
+
__param(0, inject(VGlobal)),
|
|
32916
32933
|
__metadata("design:paramtypes", [Object])
|
|
32917
32934
|
], CanvasLayerHandlerContribution);
|
|
32918
32935
|
|
|
@@ -32987,7 +33004,7 @@
|
|
|
32987
33004
|
};
|
|
32988
33005
|
OffscreenLayerHandlerContribution = __decorate([
|
|
32989
33006
|
injectable(),
|
|
32990
|
-
__param(0, inject(
|
|
33007
|
+
__param(0, inject(VGlobal)),
|
|
32991
33008
|
__metadata("design:paramtypes", [Object])
|
|
32992
33009
|
], OffscreenLayerHandlerContribution);
|
|
32993
33010
|
|
|
@@ -33922,7 +33939,7 @@
|
|
|
33922
33939
|
}
|
|
33923
33940
|
};
|
|
33924
33941
|
__decorate([
|
|
33925
|
-
inject(
|
|
33942
|
+
inject(VGlobal),
|
|
33926
33943
|
__metadata("design:type", Object)
|
|
33927
33944
|
], DefaultIncrementalDrawContribution.prototype, "global", void 0);
|
|
33928
33945
|
DefaultIncrementalDrawContribution = __decorate([
|
|
@@ -36266,8 +36283,8 @@
|
|
|
36266
36283
|
load$2(container);
|
|
36267
36284
|
load$1(container);
|
|
36268
36285
|
load(container);
|
|
36269
|
-
const
|
|
36270
|
-
application.global =
|
|
36286
|
+
const vglobal = container.get(VGlobal);
|
|
36287
|
+
application.global = vglobal;
|
|
36271
36288
|
const graphicUtil = container.get(GraphicUtil);
|
|
36272
36289
|
application.graphicUtil = graphicUtil;
|
|
36273
36290
|
const transformUtil = container.get(TransformUtil);
|
|
@@ -36902,8 +36919,8 @@
|
|
|
36902
36919
|
beforeRender: new SyncHook(['stage']),
|
|
36903
36920
|
afterRender: new SyncHook(['stage'])
|
|
36904
36921
|
};
|
|
36905
|
-
this.global = container.get(
|
|
36906
|
-
this.window = container.get(
|
|
36922
|
+
this.global = container.get(VGlobal);
|
|
36923
|
+
this.window = container.get(VWindow);
|
|
36907
36924
|
this.renderService = container.get(RenderService);
|
|
36908
36925
|
this.pickerService = container.get(PickerService);
|
|
36909
36926
|
this.pluginService = container.get(PluginService);
|
|
@@ -37333,7 +37350,7 @@
|
|
|
37333
37350
|
});
|
|
37334
37351
|
}
|
|
37335
37352
|
renderToNewWindow(fullImage = true) {
|
|
37336
|
-
const window = container.get(
|
|
37353
|
+
const window = container.get(VWindow);
|
|
37337
37354
|
if (fullImage) {
|
|
37338
37355
|
window.create({
|
|
37339
37356
|
width: this.viewWidth,
|
|
@@ -37402,7 +37419,7 @@
|
|
|
37402
37419
|
'rect'
|
|
37403
37420
|
];
|
|
37404
37421
|
|
|
37405
|
-
const version = "0.14.
|
|
37422
|
+
const version = "0.14.1-alpha.0";
|
|
37406
37423
|
|
|
37407
37424
|
exports.ACustomAnimate = ACustomAnimate;
|
|
37408
37425
|
exports.ARC3D_NUMBER_TYPE = ARC3D_NUMBER_TYPE;
|
|
@@ -37575,7 +37592,7 @@
|
|
|
37575
37592
|
exports.Theme = Theme;
|
|
37576
37593
|
exports.TimeOutTickHandler = TimeOutTickHandler;
|
|
37577
37594
|
exports.TransformUtil = TransformUtil;
|
|
37578
|
-
exports.
|
|
37595
|
+
exports.VWindow = VWindow;
|
|
37579
37596
|
exports.WindowHandlerContribution = WindowHandlerContribution;
|
|
37580
37597
|
exports.addArcToBezierPath = addArcToBezierPath$1;
|
|
37581
37598
|
exports.addAttributeToPrototype = addAttributeToPrototype;
|
|
@@ -37659,7 +37676,6 @@
|
|
|
37659
37676
|
exports.getTextBounds = getTextBounds;
|
|
37660
37677
|
exports.getTheme = getTheme;
|
|
37661
37678
|
exports.getThemeFromGroup = getThemeFromGroup;
|
|
37662
|
-
exports.global = global$1;
|
|
37663
37679
|
exports.globalTheme = globalTheme;
|
|
37664
37680
|
exports.graphicCreator = graphicCreator;
|
|
37665
37681
|
exports.graphicService = graphicService;
|
|
@@ -37720,6 +37736,7 @@
|
|
|
37720
37736
|
exports.translate = translate;
|
|
37721
37737
|
exports.version = version;
|
|
37722
37738
|
exports.verticalLayout = verticalLayout;
|
|
37739
|
+
exports.vglobal = vglobal;
|
|
37723
37740
|
exports.waitForAllSubLayers = waitForAllSubLayers;
|
|
37724
37741
|
exports.wrapCanvas = wrapCanvas;
|
|
37725
37742
|
exports.wrapContext = wrapContext;
|