@visactor/vrender 0.17.7-alpha.1 → 0.17.7-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.d.ts +1 -2
- package/cjs/index.js +2 -3
- package/cjs/index.js.map +1 -1
- package/dist/index.js +208 -179
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -2
- package/es/index.js +3 -5
- package/es/index.js.map +1 -1
- package/package.json +3 -3
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -17,12 +17,11 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
|
-
}), exports.version = void 0
|
|
20
|
+
}), exports.version = void 0;
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
|
|
23
23
|
|
|
24
|
-
exports.version = "0.17.7-alpha.
|
|
25
|
-
vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
24
|
+
exports.version = "0.17.7-alpha.2", (0, vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
26
25
|
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
27
26
|
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
|
28
27
|
(0, vrender_kits_2.registerCircle)(), (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAA4E;AAC5E,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import { container, isBrowserEnv, isNodeEnv } from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.17.7-alpha.2\";\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -6196,6 +6196,168 @@
|
|
|
6196
6196
|
},
|
|
6197
6197
|
__metadata$1d = undefined && undefined.__metadata || function (k, v) {
|
|
6198
6198
|
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
6199
|
+
};
|
|
6200
|
+
var VWindow = Symbol["for"]("VWindow");
|
|
6201
|
+
var WindowHandlerContribution = Symbol["for"]("WindowHandlerContribution");
|
|
6202
|
+
exports.DefaultWindow = /*#__PURE__*/function () {
|
|
6203
|
+
function DefaultWindow() {
|
|
6204
|
+
_classCallCheck(this, DefaultWindow);
|
|
6205
|
+
this.hooks = {
|
|
6206
|
+
onChange: new SyncHook(["x", "y", "width", "height"])
|
|
6207
|
+
}, this._uid = Generator.GenAutoIncrementId(), this.global = application.global, this.postInit();
|
|
6208
|
+
}
|
|
6209
|
+
_createClass(DefaultWindow, [{
|
|
6210
|
+
key: "width",
|
|
6211
|
+
get: function get() {
|
|
6212
|
+
if (this._handler) {
|
|
6213
|
+
var wh = this._handler.getWH();
|
|
6214
|
+
return this._width = wh.width;
|
|
6215
|
+
}
|
|
6216
|
+
return this._width;
|
|
6217
|
+
}
|
|
6218
|
+
}, {
|
|
6219
|
+
key: "height",
|
|
6220
|
+
get: function get() {
|
|
6221
|
+
if (this._handler) {
|
|
6222
|
+
var wh = this._handler.getWH();
|
|
6223
|
+
return this._height = wh.height;
|
|
6224
|
+
}
|
|
6225
|
+
return this._height;
|
|
6226
|
+
}
|
|
6227
|
+
}, {
|
|
6228
|
+
key: "dpr",
|
|
6229
|
+
get: function get() {
|
|
6230
|
+
return this._handler.getDpr();
|
|
6231
|
+
}
|
|
6232
|
+
}, {
|
|
6233
|
+
key: "postInit",
|
|
6234
|
+
value: function postInit() {
|
|
6235
|
+
var _this = this;
|
|
6236
|
+
this.global.hooks.onSetEnv.tap("window", function () {
|
|
6237
|
+
_this.active();
|
|
6238
|
+
}), this.active();
|
|
6239
|
+
}
|
|
6240
|
+
}, {
|
|
6241
|
+
key: "active",
|
|
6242
|
+
value: function active() {
|
|
6243
|
+
var global = this.global;
|
|
6244
|
+
if (!global.env || this.actived) return;
|
|
6245
|
+
container.getNamed(WindowHandlerContribution, global.env).configure(this, global), this.actived = !0;
|
|
6246
|
+
}
|
|
6247
|
+
}, {
|
|
6248
|
+
key: "style",
|
|
6249
|
+
get: function get() {
|
|
6250
|
+
return this._handler.getStyle();
|
|
6251
|
+
},
|
|
6252
|
+
set: function set(style) {
|
|
6253
|
+
this._handler.setStyle(style);
|
|
6254
|
+
}
|
|
6255
|
+
}, {
|
|
6256
|
+
key: "create",
|
|
6257
|
+
value: function create(params) {
|
|
6258
|
+
this._handler.createWindow(params);
|
|
6259
|
+
var windowWH = this._handler.getWH();
|
|
6260
|
+
this._width = windowWH.width, this._height = windowWH.height, this.title = this._handler.getTitle(), this.resizable = !0;
|
|
6261
|
+
}
|
|
6262
|
+
}, {
|
|
6263
|
+
key: "setWindowHandler",
|
|
6264
|
+
value: function setWindowHandler(handler) {
|
|
6265
|
+
this._handler = handler;
|
|
6266
|
+
}
|
|
6267
|
+
}, {
|
|
6268
|
+
key: "setDpr",
|
|
6269
|
+
value: function setDpr(dpr) {
|
|
6270
|
+
return this._handler.setDpr(dpr);
|
|
6271
|
+
}
|
|
6272
|
+
}, {
|
|
6273
|
+
key: "resize",
|
|
6274
|
+
value: function resize(w, h) {
|
|
6275
|
+
return this._handler.resizeWindow(w, h);
|
|
6276
|
+
}
|
|
6277
|
+
}, {
|
|
6278
|
+
key: "configure",
|
|
6279
|
+
value: function configure() {
|
|
6280
|
+
throw new Error("暂不支持");
|
|
6281
|
+
}
|
|
6282
|
+
}, {
|
|
6283
|
+
key: "release",
|
|
6284
|
+
value: function release() {
|
|
6285
|
+
return this._handler.releaseWindow();
|
|
6286
|
+
}
|
|
6287
|
+
}, {
|
|
6288
|
+
key: "getContext",
|
|
6289
|
+
value: function getContext() {
|
|
6290
|
+
return this._handler.getContext();
|
|
6291
|
+
}
|
|
6292
|
+
}, {
|
|
6293
|
+
key: "getNativeHandler",
|
|
6294
|
+
value: function getNativeHandler() {
|
|
6295
|
+
return this._handler.getNativeHandler();
|
|
6296
|
+
}
|
|
6297
|
+
}, {
|
|
6298
|
+
key: "getImageBuffer",
|
|
6299
|
+
value: function getImageBuffer(type) {
|
|
6300
|
+
return this._handler.getImageBuffer ? this._handler.getImageBuffer(type) : null;
|
|
6301
|
+
}
|
|
6302
|
+
}, {
|
|
6303
|
+
key: "addEventListener",
|
|
6304
|
+
value: function addEventListener(type, listener, options) {
|
|
6305
|
+
return this._handler.addEventListener(type, listener, options);
|
|
6306
|
+
}
|
|
6307
|
+
}, {
|
|
6308
|
+
key: "removeEventListener",
|
|
6309
|
+
value: function removeEventListener(type, listener, options) {
|
|
6310
|
+
return this._handler.removeEventListener(type, listener, options);
|
|
6311
|
+
}
|
|
6312
|
+
}, {
|
|
6313
|
+
key: "dispatchEvent",
|
|
6314
|
+
value: function dispatchEvent(event) {
|
|
6315
|
+
return this._handler.dispatchEvent(event);
|
|
6316
|
+
}
|
|
6317
|
+
}, {
|
|
6318
|
+
key: "getBoundingClientRect",
|
|
6319
|
+
value: function getBoundingClientRect() {
|
|
6320
|
+
return this._handler.getBoundingClientRect();
|
|
6321
|
+
}
|
|
6322
|
+
}, {
|
|
6323
|
+
key: "getContainer",
|
|
6324
|
+
value: function getContainer() {
|
|
6325
|
+
return this._handler.container;
|
|
6326
|
+
}
|
|
6327
|
+
}, {
|
|
6328
|
+
key: "clearViewBox",
|
|
6329
|
+
value: function clearViewBox(viewBox, color) {
|
|
6330
|
+
this._handler.clearViewBox(viewBox, color);
|
|
6331
|
+
}
|
|
6332
|
+
}, {
|
|
6333
|
+
key: "isVisible",
|
|
6334
|
+
value: function isVisible(bbox) {
|
|
6335
|
+
return this._handler.isVisible(bbox);
|
|
6336
|
+
}
|
|
6337
|
+
}, {
|
|
6338
|
+
key: "onVisibleChange",
|
|
6339
|
+
value: function onVisibleChange(cb) {
|
|
6340
|
+
return this._handler.onVisibleChange(cb);
|
|
6341
|
+
}
|
|
6342
|
+
}, {
|
|
6343
|
+
key: "getTopLeft",
|
|
6344
|
+
value: function getTopLeft(baseWindow) {
|
|
6345
|
+
return this._handler.getTopLeft(baseWindow);
|
|
6346
|
+
}
|
|
6347
|
+
}]);
|
|
6348
|
+
return DefaultWindow;
|
|
6349
|
+
}();
|
|
6350
|
+
exports.DefaultWindow = __decorate$1A([injectable(), __metadata$1d("design:paramtypes", [])], exports.DefaultWindow);
|
|
6351
|
+
|
|
6352
|
+
var __decorate$1z = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
6353
|
+
var d,
|
|
6354
|
+
c = arguments.length,
|
|
6355
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
6356
|
+
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
6357
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6358
|
+
},
|
|
6359
|
+
__metadata$1c = undefined && undefined.__metadata || function (k, v) {
|
|
6360
|
+
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
6199
6361
|
},
|
|
6200
6362
|
__param$Q = undefined && undefined.__param || function (paramIndex, decorator) {
|
|
6201
6363
|
return function (target, key) {
|
|
@@ -6276,10 +6438,45 @@
|
|
|
6276
6438
|
specialCharSet: "-/: .,@%'\"~" + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase()
|
|
6277
6439
|
}, null != option ? option : {}), textSpec);
|
|
6278
6440
|
}
|
|
6441
|
+
}, {
|
|
6442
|
+
key: "drawGraphicToCanvas",
|
|
6443
|
+
value: function drawGraphicToCanvas(graphic, stage, canvas) {
|
|
6444
|
+
if (!stage.defaultLayer) return null;
|
|
6445
|
+
var window = container.get(VWindow),
|
|
6446
|
+
bounds = graphic.AABBBounds,
|
|
6447
|
+
width = bounds.width(),
|
|
6448
|
+
height = bounds.height();
|
|
6449
|
+
window.create({
|
|
6450
|
+
width: width,
|
|
6451
|
+
height: height,
|
|
6452
|
+
canvas: canvas,
|
|
6453
|
+
dpr: stage.window.dpr,
|
|
6454
|
+
canvasControled: !0,
|
|
6455
|
+
offscreen: !0,
|
|
6456
|
+
title: ""
|
|
6457
|
+
});
|
|
6458
|
+
var x = -bounds.x1,
|
|
6459
|
+
y = -bounds.y1,
|
|
6460
|
+
disableCheckGraphicWidthOutRange = stage.params.optimize.disableCheckGraphicWidthOutRange;
|
|
6461
|
+
stage.params.optimize.disableCheckGraphicWidthOutRange = !0, stage.defaultLayer.getNativeHandler().drawTo(window, [graphic], {
|
|
6462
|
+
x: x,
|
|
6463
|
+
y: y,
|
|
6464
|
+
width: width,
|
|
6465
|
+
height: height,
|
|
6466
|
+
stage: stage,
|
|
6467
|
+
layer: stage.defaultLayer,
|
|
6468
|
+
renderService: stage.renderService,
|
|
6469
|
+
background: "transparent",
|
|
6470
|
+
clear: !0,
|
|
6471
|
+
updateBounds: !1
|
|
6472
|
+
}), stage.params.optimize.disableCheckGraphicWidthOutRange = disableCheckGraphicWidthOutRange;
|
|
6473
|
+
var c = window.getNativeHandler();
|
|
6474
|
+
return c.nativeCanvas ? c.nativeCanvas : null;
|
|
6475
|
+
}
|
|
6279
6476
|
}]);
|
|
6280
6477
|
return DefaultGraphicUtil;
|
|
6281
6478
|
}();
|
|
6282
|
-
exports.DefaultGraphicUtil = __decorate$
|
|
6479
|
+
exports.DefaultGraphicUtil = __decorate$1z([injectable(), __param$Q(0, inject(ContributionProvider)), __param$Q(0, named(TextMeasureContribution)), __metadata$1c("design:paramtypes", [Object])], exports.DefaultGraphicUtil);
|
|
6283
6480
|
var TransformMode;
|
|
6284
6481
|
!function (TransformMode) {
|
|
6285
6482
|
TransformMode[TransformMode.transform = 0] = "transform", TransformMode[TransformMode.matrix = 1] = "matrix";
|
|
@@ -6356,7 +6553,7 @@
|
|
|
6356
6553
|
}]);
|
|
6357
6554
|
return DefaultTransformUtil;
|
|
6358
6555
|
}();
|
|
6359
|
-
exports.DefaultTransformUtil = __decorate$
|
|
6556
|
+
exports.DefaultTransformUtil = __decorate$1z([injectable(), __metadata$1c("design:paramtypes", [])], exports.DefaultTransformUtil);
|
|
6360
6557
|
|
|
6361
6558
|
var defaultThemeObj = {
|
|
6362
6559
|
arc: DefaultArcAttribute,
|
|
@@ -12871,14 +13068,14 @@
|
|
|
12871
13068
|
var VirtualLayerHandlerContribution = Symbol["for"]("VirtualLayerHandlerContribution");
|
|
12872
13069
|
|
|
12873
13070
|
var _DefaultLayerService_,
|
|
12874
|
-
__decorate$
|
|
13071
|
+
__decorate$1y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
12875
13072
|
var d,
|
|
12876
13073
|
c = arguments.length,
|
|
12877
13074
|
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
12878
13075
|
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
12879
13076
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12880
13077
|
},
|
|
12881
|
-
__metadata$
|
|
13078
|
+
__metadata$1b = undefined && undefined.__metadata || function (k, v) {
|
|
12882
13079
|
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
12883
13080
|
};
|
|
12884
13081
|
exports.DefaultLayerService = _DefaultLayerService_ = /*#__PURE__*/function () {
|
|
@@ -12964,169 +13161,7 @@
|
|
|
12964
13161
|
}]);
|
|
12965
13162
|
return DefaultLayerService_1;
|
|
12966
13163
|
}();
|
|
12967
|
-
exports.DefaultLayerService.idprefix = "visactor_layer", exports.DefaultLayerService.prefix_count = 0, exports.DefaultLayerService = _DefaultLayerService_ = __decorate$
|
|
12968
|
-
|
|
12969
|
-
var __decorate$1y = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
12970
|
-
var d,
|
|
12971
|
-
c = arguments.length,
|
|
12972
|
-
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
12973
|
-
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
12974
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12975
|
-
},
|
|
12976
|
-
__metadata$1b = undefined && undefined.__metadata || function (k, v) {
|
|
12977
|
-
if ("object" == (typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
12978
|
-
};
|
|
12979
|
-
var VWindow = Symbol["for"]("VWindow");
|
|
12980
|
-
var WindowHandlerContribution = Symbol["for"]("WindowHandlerContribution");
|
|
12981
|
-
exports.DefaultWindow = /*#__PURE__*/function () {
|
|
12982
|
-
function DefaultWindow() {
|
|
12983
|
-
_classCallCheck(this, DefaultWindow);
|
|
12984
|
-
this.hooks = {
|
|
12985
|
-
onChange: new SyncHook(["x", "y", "width", "height"])
|
|
12986
|
-
}, this._uid = Generator.GenAutoIncrementId(), this.global = application.global, this.postInit();
|
|
12987
|
-
}
|
|
12988
|
-
_createClass(DefaultWindow, [{
|
|
12989
|
-
key: "width",
|
|
12990
|
-
get: function get() {
|
|
12991
|
-
if (this._handler) {
|
|
12992
|
-
var wh = this._handler.getWH();
|
|
12993
|
-
return this._width = wh.width;
|
|
12994
|
-
}
|
|
12995
|
-
return this._width;
|
|
12996
|
-
}
|
|
12997
|
-
}, {
|
|
12998
|
-
key: "height",
|
|
12999
|
-
get: function get() {
|
|
13000
|
-
if (this._handler) {
|
|
13001
|
-
var wh = this._handler.getWH();
|
|
13002
|
-
return this._height = wh.height;
|
|
13003
|
-
}
|
|
13004
|
-
return this._height;
|
|
13005
|
-
}
|
|
13006
|
-
}, {
|
|
13007
|
-
key: "dpr",
|
|
13008
|
-
get: function get() {
|
|
13009
|
-
return this._handler.getDpr();
|
|
13010
|
-
}
|
|
13011
|
-
}, {
|
|
13012
|
-
key: "postInit",
|
|
13013
|
-
value: function postInit() {
|
|
13014
|
-
var _this = this;
|
|
13015
|
-
this.global.hooks.onSetEnv.tap("window", function () {
|
|
13016
|
-
_this.active();
|
|
13017
|
-
}), this.active();
|
|
13018
|
-
}
|
|
13019
|
-
}, {
|
|
13020
|
-
key: "active",
|
|
13021
|
-
value: function active() {
|
|
13022
|
-
var global = this.global;
|
|
13023
|
-
if (!global.env || this.actived) return;
|
|
13024
|
-
container.getNamed(WindowHandlerContribution, global.env).configure(this, global), this.actived = !0;
|
|
13025
|
-
}
|
|
13026
|
-
}, {
|
|
13027
|
-
key: "style",
|
|
13028
|
-
get: function get() {
|
|
13029
|
-
return this._handler.getStyle();
|
|
13030
|
-
},
|
|
13031
|
-
set: function set(style) {
|
|
13032
|
-
this._handler.setStyle(style);
|
|
13033
|
-
}
|
|
13034
|
-
}, {
|
|
13035
|
-
key: "create",
|
|
13036
|
-
value: function create(params) {
|
|
13037
|
-
this._handler.createWindow(params);
|
|
13038
|
-
var windowWH = this._handler.getWH();
|
|
13039
|
-
this._width = windowWH.width, this._height = windowWH.height, this.title = this._handler.getTitle(), this.resizable = !0;
|
|
13040
|
-
}
|
|
13041
|
-
}, {
|
|
13042
|
-
key: "setWindowHandler",
|
|
13043
|
-
value: function setWindowHandler(handler) {
|
|
13044
|
-
this._handler = handler;
|
|
13045
|
-
}
|
|
13046
|
-
}, {
|
|
13047
|
-
key: "setDpr",
|
|
13048
|
-
value: function setDpr(dpr) {
|
|
13049
|
-
return this._handler.setDpr(dpr);
|
|
13050
|
-
}
|
|
13051
|
-
}, {
|
|
13052
|
-
key: "resize",
|
|
13053
|
-
value: function resize(w, h) {
|
|
13054
|
-
return this._handler.resizeWindow(w, h);
|
|
13055
|
-
}
|
|
13056
|
-
}, {
|
|
13057
|
-
key: "configure",
|
|
13058
|
-
value: function configure() {
|
|
13059
|
-
throw new Error("暂不支持");
|
|
13060
|
-
}
|
|
13061
|
-
}, {
|
|
13062
|
-
key: "release",
|
|
13063
|
-
value: function release() {
|
|
13064
|
-
return this._handler.releaseWindow();
|
|
13065
|
-
}
|
|
13066
|
-
}, {
|
|
13067
|
-
key: "getContext",
|
|
13068
|
-
value: function getContext() {
|
|
13069
|
-
return this._handler.getContext();
|
|
13070
|
-
}
|
|
13071
|
-
}, {
|
|
13072
|
-
key: "getNativeHandler",
|
|
13073
|
-
value: function getNativeHandler() {
|
|
13074
|
-
return this._handler.getNativeHandler();
|
|
13075
|
-
}
|
|
13076
|
-
}, {
|
|
13077
|
-
key: "getImageBuffer",
|
|
13078
|
-
value: function getImageBuffer(type) {
|
|
13079
|
-
return this._handler.getImageBuffer ? this._handler.getImageBuffer(type) : null;
|
|
13080
|
-
}
|
|
13081
|
-
}, {
|
|
13082
|
-
key: "addEventListener",
|
|
13083
|
-
value: function addEventListener(type, listener, options) {
|
|
13084
|
-
return this._handler.addEventListener(type, listener, options);
|
|
13085
|
-
}
|
|
13086
|
-
}, {
|
|
13087
|
-
key: "removeEventListener",
|
|
13088
|
-
value: function removeEventListener(type, listener, options) {
|
|
13089
|
-
return this._handler.removeEventListener(type, listener, options);
|
|
13090
|
-
}
|
|
13091
|
-
}, {
|
|
13092
|
-
key: "dispatchEvent",
|
|
13093
|
-
value: function dispatchEvent(event) {
|
|
13094
|
-
return this._handler.dispatchEvent(event);
|
|
13095
|
-
}
|
|
13096
|
-
}, {
|
|
13097
|
-
key: "getBoundingClientRect",
|
|
13098
|
-
value: function getBoundingClientRect() {
|
|
13099
|
-
return this._handler.getBoundingClientRect();
|
|
13100
|
-
}
|
|
13101
|
-
}, {
|
|
13102
|
-
key: "getContainer",
|
|
13103
|
-
value: function getContainer() {
|
|
13104
|
-
return this._handler.container;
|
|
13105
|
-
}
|
|
13106
|
-
}, {
|
|
13107
|
-
key: "clearViewBox",
|
|
13108
|
-
value: function clearViewBox(viewBox, color) {
|
|
13109
|
-
this._handler.clearViewBox(viewBox, color);
|
|
13110
|
-
}
|
|
13111
|
-
}, {
|
|
13112
|
-
key: "isVisible",
|
|
13113
|
-
value: function isVisible(bbox) {
|
|
13114
|
-
return this._handler.isVisible(bbox);
|
|
13115
|
-
}
|
|
13116
|
-
}, {
|
|
13117
|
-
key: "onVisibleChange",
|
|
13118
|
-
value: function onVisibleChange(cb) {
|
|
13119
|
-
return this._handler.onVisibleChange(cb);
|
|
13120
|
-
}
|
|
13121
|
-
}, {
|
|
13122
|
-
key: "getTopLeft",
|
|
13123
|
-
value: function getTopLeft(baseWindow) {
|
|
13124
|
-
return this._handler.getTopLeft(baseWindow);
|
|
13125
|
-
}
|
|
13126
|
-
}]);
|
|
13127
|
-
return DefaultWindow;
|
|
13128
|
-
}();
|
|
13129
|
-
exports.DefaultWindow = __decorate$1y([injectable(), __metadata$1b("design:paramtypes", [])], exports.DefaultWindow);
|
|
13164
|
+
exports.DefaultLayerService.idprefix = "visactor_layer", exports.DefaultLayerService.prefix_count = 0, exports.DefaultLayerService = _DefaultLayerService_ = __decorate$1y([injectable(), __metadata$1b("design:paramtypes", [])], exports.DefaultLayerService);
|
|
13130
13165
|
|
|
13131
13166
|
var coreModule = new ContainerModule(function (bind) {
|
|
13132
13167
|
bind(VGlobal).to(exports.DefaultGlobal).inSingletonScope(), bind(VWindow).to(exports.DefaultWindow), bind(GraphicUtil).to(exports.DefaultGraphicUtil).inSingletonScope(), bind(TransformUtil).to(exports.DefaultTransformUtil).inSingletonScope(), bind(LayerService).to(exports.DefaultLayerService).inSingletonScope();
|
|
@@ -21023,8 +21058,8 @@
|
|
|
21023
21058
|
}();
|
|
21024
21059
|
exports.Canvas3DPickItemInterceptor = __decorate$1i([injectable()], exports.Canvas3DPickItemInterceptor);
|
|
21025
21060
|
|
|
21026
|
-
var pickModule = new ContainerModule(function (bind
|
|
21027
|
-
|
|
21061
|
+
var pickModule = new ContainerModule(function (bind) {
|
|
21062
|
+
bind(PickerService).toService(GlobalPickerService), bind(exports.Canvas3DPickItemInterceptor).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(exports.Canvas3DPickItemInterceptor), bind(exports.ShadowRootPickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(exports.ShadowRootPickItemInterceptorContribution), bind(exports.InteractivePickItemInterceptorContribution).toSelf().inSingletonScope(), bind(PickItemInterceptor).toService(exports.InteractivePickItemInterceptorContribution), bindContributionProvider(bind, PickItemInterceptor);
|
|
21028
21063
|
});
|
|
21029
21064
|
|
|
21030
21065
|
var graphicModule = new ContainerModule(function (bind) {
|
|
@@ -21836,12 +21871,12 @@
|
|
|
21836
21871
|
}
|
|
21837
21872
|
var d = context.dpr % 1;
|
|
21838
21873
|
(d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.inuse = !0, context.clearMatrix(), context.setTransformForCurrent(!0);
|
|
21839
|
-
var drawInArea = dirtyBounds.width() * context.dpr
|
|
21874
|
+
var drawInArea = dirtyBounds.width() * context.dpr < context.canvas.width || dirtyBounds.height() * context.dpr < context.canvas.height;
|
|
21840
21875
|
context.save(), context.translate(x, y, !0), drawInArea && (context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip()), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), context.save(), renderService.renderTreeRoots.sort(function (a, b) {
|
|
21841
21876
|
var _a, _b;
|
|
21842
21877
|
return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
|
|
21843
21878
|
}).forEach(function (group) {
|
|
21844
|
-
_this2.renderGroup(group, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0));
|
|
21879
|
+
group.isContainer ? _this2.renderGroup(group, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0)) : _this2.renderItem(group, drawContext);
|
|
21845
21880
|
}), context.restore(), context.restore(), context.draw(), context.inuse = !1;
|
|
21846
21881
|
}
|
|
21847
21882
|
}, {
|
|
@@ -22622,11 +22657,7 @@
|
|
|
22622
22657
|
container.load(renderModule);
|
|
22623
22658
|
}
|
|
22624
22659
|
|
|
22625
|
-
|
|
22626
|
-
function preLoadAllModule() {
|
|
22627
|
-
loaded$r || (loaded$r = !0, container.load(coreModule), container.load(graphicModule), container.load(renderModule$1), container.load(pickModule), container.load(pluginModule), load$1(container), load(container));
|
|
22628
|
-
}
|
|
22629
|
-
preLoadAllModule();
|
|
22660
|
+
container.load(coreModule), container.load(graphicModule), container.load(renderModule$1), container.load(pickModule), container.load(pluginModule), load$1(container), load(container);
|
|
22630
22661
|
var vglobal = container.get(VGlobal);
|
|
22631
22662
|
application.global = vglobal;
|
|
22632
22663
|
var graphicUtil = container.get(GraphicUtil);
|
|
@@ -34363,8 +34394,7 @@
|
|
|
34363
34394
|
|
|
34364
34395
|
var roughModule = _roughModule;
|
|
34365
34396
|
|
|
34366
|
-
const version = "0.17.7-alpha.
|
|
34367
|
-
preLoadAllModule();
|
|
34397
|
+
const version = "0.17.7-alpha.2";
|
|
34368
34398
|
if (isBrowserEnv()) {
|
|
34369
34399
|
loadBrowserEnv(container);
|
|
34370
34400
|
}
|
|
@@ -34832,7 +34862,6 @@
|
|
|
34832
34862
|
exports.polygonCanvasPickModule = polygonCanvasPickModule;
|
|
34833
34863
|
exports.polygonMathPickModule = polygonMathPickModule;
|
|
34834
34864
|
exports.polygonModule = polygonModule;
|
|
34835
|
-
exports.preLoadAllModule = preLoadAllModule;
|
|
34836
34865
|
exports.pyramid3dCanvasPickModule = pyramid3dCanvasPickModule;
|
|
34837
34866
|
exports.pyramid3dModule = pyramid3dModule;
|
|
34838
34867
|
exports.rafBasedSto = rafBasedSto;
|