@antv/g 5.1.3-alpha.1 → 5.1.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/dist/Canvas.d.ts +2 -2
- package/dist/Canvas.d.ts.map +1 -1
- package/dist/css/StyleValueRegistry.d.ts +2 -1
- package/dist/css/StyleValueRegistry.d.ts.map +1 -1
- package/dist/css/interfaces.d.ts +4 -0
- package/dist/css/interfaces.d.ts.map +1 -1
- package/dist/css/parser/dimension.d.ts +1 -1
- package/dist/css/parser/dimension.d.ts.map +1 -1
- package/dist/css/parser/path.d.ts +2 -2
- package/dist/css/parser/path.d.ts.map +1 -1
- package/dist/css/properties/CSSPropertyAngle.d.ts +4 -0
- package/dist/css/properties/CSSPropertyAngle.d.ts.map +1 -0
- package/dist/css/properties/CSSPropertyTextTransform.d.ts +5 -1
- package/dist/css/properties/CSSPropertyTextTransform.d.ts.map +1 -1
- package/dist/css/properties/index.d.ts +10 -9
- package/dist/css/properties/index.d.ts.map +1 -1
- package/dist/display-objects/DisplayObject.d.ts.map +1 -1
- package/dist/dom/Element.d.ts +10 -3
- package/dist/dom/Element.d.ts.map +1 -1
- package/dist/dom/interfaces.d.ts +10 -9
- package/dist/dom/interfaces.d.ts.map +1 -1
- package/dist/index.esm.js +932 -852
- package/dist/index.js +924 -843
- package/dist/index.umd.js +2658 -2573
- package/dist/index.umd.min.js +3 -3
- package/dist/plugins/EventPlugin.d.ts.map +1 -1
- package/dist/services/SceneGraphSelector.d.ts +4 -1
- package/dist/services/SceneGraphSelector.d.ts.map +1 -1
- package/dist/types.d.ts +4 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -6,8 +6,8 @@ import { EventEmitter } from 'eventemitter3';
|
|
|
6
6
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
7
7
|
import { vec3, mat3, mat4, quat, vec4 } from 'gl-matrix';
|
|
8
8
|
import { color } from 'd3-color';
|
|
9
|
-
import { path2Absolute, path2Curve, path2Segments } from '@antv/util';
|
|
10
9
|
import { Cubic as Cubic$1, Polyline as Polyline$1, Line as Line$1 } from '@antv/g-math';
|
|
10
|
+
import { path2Absolute, path2Curve, path2Segments } from '@antv/util';
|
|
11
11
|
import { requestAnimationFrame as requestAnimationFrame$1, cancelAnimationFrame as cancelAnimationFrame$1 } from 'request-animation-frame-polyfill';
|
|
12
12
|
|
|
13
13
|
function _regeneratorRuntime() {
|
|
@@ -1166,562 +1166,174 @@ var Rectangle = /*#__PURE__*/function () {
|
|
|
1166
1166
|
return Rectangle;
|
|
1167
1167
|
}();
|
|
1168
1168
|
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1169
|
+
function DCHECK(bool) {
|
|
1170
|
+
if (!bool) {
|
|
1171
|
+
throw new Error();
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
function DCHECK_EQ(a, b) {
|
|
1175
|
+
if (a !== b) {
|
|
1176
|
+
throw new Error();
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
function DCHECK_NE(a, b) {
|
|
1180
|
+
if (a === b) {
|
|
1181
|
+
throw new Error();
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
function isUndefined(a) {
|
|
1185
|
+
return typeof a === 'undefined';
|
|
1186
|
+
}
|
|
1187
|
+
function isNil(a) {
|
|
1188
|
+
return a == null;
|
|
1189
|
+
}
|
|
1190
|
+
function isNumber(value) {
|
|
1191
|
+
return typeof value === 'number';
|
|
1192
|
+
}
|
|
1193
|
+
function isFunction(value) {
|
|
1194
|
+
return typeof value === 'function';
|
|
1195
|
+
}
|
|
1196
|
+
function isBoolean(value) {
|
|
1197
|
+
return typeof value === 'boolean';
|
|
1198
|
+
}
|
|
1199
|
+
function isObject(value) {
|
|
1200
|
+
return Object.prototype.toString.call(value) === '[object Object]';
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
var canvasMap = {};
|
|
1204
|
+
var defaultCanvasIdCounter = 0;
|
|
1174
1205
|
/**
|
|
1175
|
-
*
|
|
1176
|
-
* * getElementById
|
|
1177
|
-
* * getElementsByClassName
|
|
1178
|
-
* * getElementsByName
|
|
1179
|
-
* * getElementsByTag
|
|
1180
|
-
* * querySelector
|
|
1181
|
-
* * querySelectorAll
|
|
1206
|
+
* destroy existed canvas with the same id
|
|
1182
1207
|
*/
|
|
1183
1208
|
|
|
1184
|
-
|
|
1185
|
-
|
|
1209
|
+
function cleanExistedCanvas(container, canvas) {
|
|
1210
|
+
if (container) {
|
|
1211
|
+
var id = typeof container === 'string' ? container : container.id || defaultCanvasIdCounter++;
|
|
1186
1212
|
|
|
1187
|
-
|
|
1213
|
+
if (canvasMap[id]) {
|
|
1214
|
+
canvasMap[id].destroy();
|
|
1215
|
+
}
|
|
1188
1216
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
return node.className === query.substring(1);
|
|
1194
|
-
});
|
|
1195
|
-
} else if (query.startsWith('#')) {
|
|
1196
|
-
// getElementById('id')
|
|
1197
|
-
return root.find(function (node) {
|
|
1198
|
-
// return !node.shadow && node.id === query.substring(1);
|
|
1199
|
-
return node.id === query.substring(1);
|
|
1200
|
-
});
|
|
1201
|
-
} else if (query.startsWith('[name=')) {
|
|
1202
|
-
var matches = query.match(NAME_REGEXP);
|
|
1217
|
+
canvasMap[id] = canvas;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
1203
1221
|
|
|
1204
|
-
|
|
1205
|
-
|
|
1222
|
+
/**
|
|
1223
|
+
* https://github.com/gre/bezier-easing
|
|
1224
|
+
* BezierEasing - use bezier curve for transition easing function
|
|
1225
|
+
* by Gaëtan Renaudeau 2014 - 2015 – MIT License
|
|
1226
|
+
*/
|
|
1227
|
+
// These values are established by empiricism with tests (tradeoff: performance VS precision)
|
|
1228
|
+
var NEWTON_ITERATIONS = 4;
|
|
1229
|
+
var NEWTON_MIN_SLOPE = 0.001;
|
|
1230
|
+
var SUBDIVISION_PRECISION = 0.0000001;
|
|
1231
|
+
var SUBDIVISION_MAX_ITERATIONS = 10;
|
|
1232
|
+
var kSplineTableSize = 11;
|
|
1233
|
+
var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
|
|
1234
|
+
var float32ArraySupported = typeof Float32Array === 'function';
|
|
1235
|
+
var A = function A(aA1, aA2) {
|
|
1236
|
+
return 1.0 - 3.0 * aA2 + 3.0 * aA1;
|
|
1237
|
+
};
|
|
1238
|
+
var B = function B(aA1, aA2) {
|
|
1239
|
+
return 3.0 * aA2 - 6.0 * aA1;
|
|
1240
|
+
};
|
|
1241
|
+
var C = function C(aA1) {
|
|
1242
|
+
return 3.0 * aA1;
|
|
1243
|
+
}; // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
|
|
1206
1244
|
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
} else {
|
|
1211
|
-
return null;
|
|
1212
|
-
}
|
|
1213
|
-
} else {
|
|
1214
|
-
// getElementsByTag('circle');
|
|
1215
|
-
return root.find(function (node) {
|
|
1216
|
-
return root !== node && node.nodeName === query;
|
|
1217
|
-
});
|
|
1218
|
-
}
|
|
1219
|
-
};
|
|
1245
|
+
var calcBezier = function calcBezier(aT, aA1, aA2) {
|
|
1246
|
+
return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
|
|
1247
|
+
}; // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
|
|
1220
1248
|
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
});
|
|
1229
|
-
} else if (query.startsWith('#')) {
|
|
1230
|
-
return root.findAll(function (node) {
|
|
1231
|
-
return root !== node && node.id === query.substring(1);
|
|
1232
|
-
});
|
|
1233
|
-
} else if (query.startsWith('[name=')) {
|
|
1234
|
-
// getElementsByName();
|
|
1235
|
-
var matches = query.match(NAME_REGEXP);
|
|
1249
|
+
var getSlope = function getSlope(aT, aA1, aA2) {
|
|
1250
|
+
return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
|
|
1251
|
+
};
|
|
1252
|
+
var binarySubdivide = function binarySubdivide(aX, aA, aB, mX1, mX2) {
|
|
1253
|
+
var currentX,
|
|
1254
|
+
currentT,
|
|
1255
|
+
i = 0;
|
|
1236
1256
|
|
|
1237
|
-
|
|
1238
|
-
|
|
1257
|
+
do {
|
|
1258
|
+
currentT = aA + (aB - aA) / 2.0;
|
|
1259
|
+
currentX = calcBezier(currentT, mX1, mX2) - aX;
|
|
1260
|
+
if (currentX > 0.0) aB = currentT;else aA = currentT;
|
|
1261
|
+
} while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
|
|
1239
1262
|
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
return root !== node && node.nodeName === query;
|
|
1250
|
-
});
|
|
1251
|
-
}
|
|
1252
|
-
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1253
|
-
;
|
|
1263
|
+
return currentT;
|
|
1264
|
+
};
|
|
1265
|
+
var newtonRaphsonIterate = function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
|
|
1266
|
+
for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
|
|
1267
|
+
var currentSlope = getSlope(aGuessT, mX1, mX2);
|
|
1268
|
+
if (currentSlope === 0.0) return aGuessT;
|
|
1269
|
+
var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
|
|
1270
|
+
aGuessT -= currentX / currentSlope;
|
|
1271
|
+
}
|
|
1254
1272
|
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1273
|
+
return aGuessT;
|
|
1274
|
+
};
|
|
1275
|
+
var bezier = function bezier(mX1, mY1, mX2, mY2) {
|
|
1276
|
+
if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) throw new Error('bezier x values must be in [0, 1] range');
|
|
1277
|
+
if (mX1 === mY1 && mX2 === mY2) return function (t) {
|
|
1278
|
+
return t;
|
|
1279
|
+
}; // Precompute samples table
|
|
1259
1280
|
|
|
1260
|
-
|
|
1261
|
-
}();
|
|
1281
|
+
var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
|
|
1262
1282
|
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
}
|
|
1283
|
+
for (var i = 0; i < kSplineTableSize; ++i) {
|
|
1284
|
+
sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
|
|
1285
|
+
}
|
|
1266
1286
|
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
* TODO: use MutationObserver instead
|
|
1272
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
|
|
1273
|
-
*/
|
|
1274
|
-
var ElementEvent;
|
|
1287
|
+
var getTForX = function getTForX(aX) {
|
|
1288
|
+
var intervalStart = 0.0;
|
|
1289
|
+
var currentSample = 1;
|
|
1290
|
+
var lastSample = kSplineTableSize - 1;
|
|
1275
1291
|
|
|
1276
|
-
(
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
* @see https://www.w3.org/TR/DOM-Level-3-Events/#event-type-DOMAttrModified
|
|
1280
|
-
*/
|
|
1292
|
+
for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {
|
|
1293
|
+
intervalStart += kSampleStepSize;
|
|
1294
|
+
}
|
|
1281
1295
|
|
|
1282
|
-
|
|
1283
|
-
/**
|
|
1284
|
-
* it has been inserted
|
|
1285
|
-
* @see https://www.w3.org/TR/DOM-Level-3-Events/#event-type-DOMNodeInserted
|
|
1286
|
-
*/
|
|
1296
|
+
--currentSample; // Interpolate to provide an initial guess for t
|
|
1287
1297
|
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1298
|
+
var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);
|
|
1299
|
+
var guessForT = intervalStart + dist * kSampleStepSize;
|
|
1300
|
+
var initialSlope = getSlope(guessForT, mX1, mX2);
|
|
1301
|
+
if (initialSlope >= NEWTON_MIN_SLOPE) return newtonRaphsonIterate(aX, guessForT, mX1, mX2);else if (initialSlope === 0.0) return guessForT;else {
|
|
1302
|
+
return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
|
|
1303
|
+
}
|
|
1304
|
+
};
|
|
1292
1305
|
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1306
|
+
return function (t) {
|
|
1307
|
+
// Because JavaScript number are imprecise, we should guarantee the extremes are right.
|
|
1308
|
+
if (t === 0 || t === 1) return t;
|
|
1309
|
+
return calcBezier(getTForX(t), mY1, mY2);
|
|
1310
|
+
};
|
|
1311
|
+
};
|
|
1298
1312
|
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1313
|
+
function clamp(number, boundOne, boundTwo) {
|
|
1314
|
+
if (!boundTwo) {
|
|
1315
|
+
return Math.max(number, boundOne) === boundOne ? number : boundOne;
|
|
1316
|
+
} else if (Math.min(number, boundOne) === number) {
|
|
1317
|
+
return boundOne;
|
|
1318
|
+
} else if (Math.max(number, boundTwo) === number) {
|
|
1319
|
+
return boundTwo;
|
|
1320
|
+
}
|
|
1303
1321
|
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1322
|
+
return number;
|
|
1323
|
+
}
|
|
1324
|
+
function getAngle(angle) {
|
|
1325
|
+
if (angle === undefined) {
|
|
1326
|
+
return 0;
|
|
1327
|
+
} else if (angle > 360 || angle < -360) {
|
|
1328
|
+
return angle % 360;
|
|
1329
|
+
}
|
|
1308
1330
|
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
ElementEvent["BOUNDS_CHANGED"] = "bounds-changed";
|
|
1316
|
-
ElementEvent["GEOMETRY_BOUNDS_CHANGED"] = "geometry-bounds-changed";
|
|
1317
|
-
/**
|
|
1318
|
-
* trigger when z-index changed
|
|
1319
|
-
*/
|
|
1320
|
-
|
|
1321
|
-
ElementEvent["RENDER_ORDER_CHANGED"] = "render-order-changed";
|
|
1322
|
-
})(ElementEvent || (ElementEvent = {}));
|
|
1323
|
-
|
|
1324
|
-
/**
|
|
1325
|
-
* An DOM-compatible synthetic event implementation that is "forwarded" on behalf of an original
|
|
1326
|
-
* FederatedEvent or native {@link https://dom.spec.whatwg.org/#event Event}.
|
|
1327
|
-
*/
|
|
1328
|
-
|
|
1329
|
-
var FederatedEvent = /*#__PURE__*/function () {
|
|
1330
|
-
/**
|
|
1331
|
-
* The event boundary which manages this event. Propagation can only occur
|
|
1332
|
-
* within the boundary's jurisdiction.
|
|
1333
|
-
*/
|
|
1334
|
-
function FederatedEvent(manager) {
|
|
1335
|
-
this.type = void 0;
|
|
1336
|
-
this.eventPhase = FederatedEvent.prototype.NONE;
|
|
1337
|
-
this.target = void 0;
|
|
1338
|
-
this.bubbles = true;
|
|
1339
|
-
this.cancelBubble = true;
|
|
1340
|
-
this.cancelable = false;
|
|
1341
|
-
this.currentTarget = void 0;
|
|
1342
|
-
this.defaultPrevented = false;
|
|
1343
|
-
this.timeStamp = void 0;
|
|
1344
|
-
this.nativeEvent = void 0;
|
|
1345
|
-
this.originalEvent = void 0;
|
|
1346
|
-
this.propagationStopped = false;
|
|
1347
|
-
this.propagationImmediatelyStopped = false;
|
|
1348
|
-
this.manager = void 0;
|
|
1349
|
-
this.detail = void 0;
|
|
1350
|
-
this.layer = new Point();
|
|
1351
|
-
this.page = new Point();
|
|
1352
|
-
this.canvas = new Point();
|
|
1353
|
-
this.viewport = new Point();
|
|
1354
|
-
this.path = void 0;
|
|
1355
|
-
this.view = void 0;
|
|
1356
|
-
this.which = void 0;
|
|
1357
|
-
this.returnValue = void 0;
|
|
1358
|
-
this.srcElement = void 0;
|
|
1359
|
-
this.composed = false;
|
|
1360
|
-
this.isTrusted = void 0;
|
|
1361
|
-
this.NONE = 0;
|
|
1362
|
-
this.CAPTURING_PHASE = 1;
|
|
1363
|
-
this.AT_TARGET = 2;
|
|
1364
|
-
this.BUBBLING_PHASE = 3;
|
|
1365
|
-
this.manager = manager;
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
var _proto = FederatedEvent.prototype;
|
|
1369
|
-
|
|
1370
|
-
/**
|
|
1371
|
-
* The propagation path for this event
|
|
1372
|
-
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/Event/composedPath
|
|
1373
|
-
*
|
|
1374
|
-
* So composedPath()[0] represents the original target.
|
|
1375
|
-
* @see https://polymer-library.polymer-project.org/3.0/docs/devguide/events#retargeting
|
|
1376
|
-
*/
|
|
1377
|
-
_proto.composedPath = function composedPath() {
|
|
1378
|
-
if (this.manager && (!this.path || this.path[0] !== this.target)) {
|
|
1379
|
-
this.path = this.target ? this.manager.propagationPath(this.target) : [];
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
return this.path;
|
|
1383
|
-
}
|
|
1384
|
-
/**
|
|
1385
|
-
* @deprecated
|
|
1386
|
-
*/
|
|
1387
|
-
;
|
|
1388
|
-
|
|
1389
|
-
/**
|
|
1390
|
-
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/Event/preventDefault
|
|
1391
|
-
*/
|
|
1392
|
-
_proto.preventDefault = function preventDefault() {
|
|
1393
|
-
if (this.nativeEvent instanceof Event && this.nativeEvent.cancelable) {
|
|
1394
|
-
this.nativeEvent.preventDefault();
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
this.defaultPrevented = true;
|
|
1398
|
-
}
|
|
1399
|
-
/**
|
|
1400
|
-
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/Event/stopImmediatePropagation
|
|
1401
|
-
*/
|
|
1402
|
-
;
|
|
1403
|
-
|
|
1404
|
-
_proto.stopImmediatePropagation = function stopImmediatePropagation() {
|
|
1405
|
-
this.propagationImmediatelyStopped = true;
|
|
1406
|
-
}
|
|
1407
|
-
/**
|
|
1408
|
-
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/Event/stopPropagation
|
|
1409
|
-
*/
|
|
1410
|
-
;
|
|
1411
|
-
|
|
1412
|
-
_proto.stopPropagation = function stopPropagation() {
|
|
1413
|
-
this.propagationStopped = true;
|
|
1414
|
-
}
|
|
1415
|
-
/**
|
|
1416
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/view
|
|
1417
|
-
*/
|
|
1418
|
-
;
|
|
1419
|
-
|
|
1420
|
-
/**
|
|
1421
|
-
* added for compatibility with DOM Event,
|
|
1422
|
-
* deprecated props and methods
|
|
1423
|
-
*/
|
|
1424
|
-
_proto.initEvent = function initEvent() {};
|
|
1425
|
-
|
|
1426
|
-
_proto.initUIEvent = function initUIEvent() {};
|
|
1427
|
-
|
|
1428
|
-
_createClass(FederatedEvent, [{
|
|
1429
|
-
key: "name",
|
|
1430
|
-
get:
|
|
1431
|
-
/**
|
|
1432
|
-
* The type of event, supports the following:
|
|
1433
|
-
* * pointerdown
|
|
1434
|
-
* * touchstart
|
|
1435
|
-
* * mousedown
|
|
1436
|
-
* * rightdown
|
|
1437
|
-
* * ...
|
|
1438
|
-
*/
|
|
1439
|
-
|
|
1440
|
-
/**
|
|
1441
|
-
* @deprecated
|
|
1442
|
-
*/
|
|
1443
|
-
function get() {
|
|
1444
|
-
return this.type;
|
|
1445
|
-
}
|
|
1446
|
-
/**
|
|
1447
|
-
* The propagation phase.
|
|
1448
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Event/eventPhase
|
|
1449
|
-
*/
|
|
1450
|
-
|
|
1451
|
-
}, {
|
|
1452
|
-
key: "layerX",
|
|
1453
|
-
get: function get() {
|
|
1454
|
-
return this.layer.x;
|
|
1455
|
-
}
|
|
1456
|
-
}, {
|
|
1457
|
-
key: "layerY",
|
|
1458
|
-
get: function get() {
|
|
1459
|
-
return this.layer.y;
|
|
1460
|
-
}
|
|
1461
|
-
/**
|
|
1462
|
-
* The coordinates of the event relative to the DOM document.
|
|
1463
|
-
* This is a non-standard property.
|
|
1464
|
-
* relative to the DOM document.
|
|
1465
|
-
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/MouseEvent/pageX
|
|
1466
|
-
*/
|
|
1467
|
-
|
|
1468
|
-
}, {
|
|
1469
|
-
key: "pageX",
|
|
1470
|
-
get: function get() {
|
|
1471
|
-
return this.page.x;
|
|
1472
|
-
}
|
|
1473
|
-
}, {
|
|
1474
|
-
key: "pageY",
|
|
1475
|
-
get: function get() {
|
|
1476
|
-
return this.page.y;
|
|
1477
|
-
}
|
|
1478
|
-
/**
|
|
1479
|
-
* relative to Canvas, origin is left-top
|
|
1480
|
-
*/
|
|
1481
|
-
|
|
1482
|
-
}, {
|
|
1483
|
-
key: "x",
|
|
1484
|
-
get: function get() {
|
|
1485
|
-
return this.canvas.x;
|
|
1486
|
-
}
|
|
1487
|
-
}, {
|
|
1488
|
-
key: "y",
|
|
1489
|
-
get: function get() {
|
|
1490
|
-
return this.canvas.y;
|
|
1491
|
-
}
|
|
1492
|
-
}, {
|
|
1493
|
-
key: "canvasX",
|
|
1494
|
-
get: function get() {
|
|
1495
|
-
return this.canvas.x;
|
|
1496
|
-
}
|
|
1497
|
-
}, {
|
|
1498
|
-
key: "canvasY",
|
|
1499
|
-
get: function get() {
|
|
1500
|
-
return this.canvas.y;
|
|
1501
|
-
}
|
|
1502
|
-
/**
|
|
1503
|
-
* relative to Viewport, account for Camera
|
|
1504
|
-
*/
|
|
1505
|
-
|
|
1506
|
-
}, {
|
|
1507
|
-
key: "viewportX",
|
|
1508
|
-
get: function get() {
|
|
1509
|
-
return this.viewport.x;
|
|
1510
|
-
}
|
|
1511
|
-
}, {
|
|
1512
|
-
key: "viewportY",
|
|
1513
|
-
get: function get() {
|
|
1514
|
-
return this.viewport.y;
|
|
1515
|
-
}
|
|
1516
|
-
}, {
|
|
1517
|
-
key: "propagationPath",
|
|
1518
|
-
get: function get() {
|
|
1519
|
-
return this.composedPath();
|
|
1520
|
-
}
|
|
1521
|
-
}]);
|
|
1522
|
-
|
|
1523
|
-
return FederatedEvent;
|
|
1524
|
-
}();
|
|
1525
|
-
|
|
1526
|
-
var MutationEvent = /*#__PURE__*/function (_FederatedEvent) {
|
|
1527
|
-
_inheritsLoose(MutationEvent, _FederatedEvent);
|
|
1528
|
-
|
|
1529
|
-
function MutationEvent(typeArg, relatedNode, prevValue, newValue, attrName, attrChange, prevParsedValue, newParsedValue) {
|
|
1530
|
-
var _this;
|
|
1531
|
-
|
|
1532
|
-
_this = _FederatedEvent.call(this, null) || this;
|
|
1533
|
-
_this.relatedNode = void 0;
|
|
1534
|
-
_this.prevValue = void 0;
|
|
1535
|
-
_this.newValue = void 0;
|
|
1536
|
-
_this.attrName = void 0;
|
|
1537
|
-
_this.attrChange = void 0;
|
|
1538
|
-
_this.prevParsedValue = void 0;
|
|
1539
|
-
_this.newParsedValue = void 0;
|
|
1540
|
-
_this.relatedNode = relatedNode;
|
|
1541
|
-
_this.prevValue = prevValue;
|
|
1542
|
-
_this.newValue = newValue;
|
|
1543
|
-
_this.attrName = attrName;
|
|
1544
|
-
_this.attrChange = attrChange;
|
|
1545
|
-
_this.prevParsedValue = prevParsedValue;
|
|
1546
|
-
_this.newParsedValue = newParsedValue;
|
|
1547
|
-
_this.type = typeArg;
|
|
1548
|
-
return _this;
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
return MutationEvent;
|
|
1552
|
-
}(FederatedEvent);
|
|
1553
|
-
MutationEvent.ADDITION = 2;
|
|
1554
|
-
MutationEvent.MODIFICATION = 1;
|
|
1555
|
-
MutationEvent.REMOVAL = 3;
|
|
1556
|
-
|
|
1557
|
-
function DCHECK(bool) {
|
|
1558
|
-
if (!bool) {
|
|
1559
|
-
throw new Error();
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
function DCHECK_EQ(a, b) {
|
|
1563
|
-
if (a !== b) {
|
|
1564
|
-
throw new Error();
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
function DCHECK_NE(a, b) {
|
|
1568
|
-
if (a === b) {
|
|
1569
|
-
throw new Error();
|
|
1570
|
-
}
|
|
1571
|
-
}
|
|
1572
|
-
function isUndefined(a) {
|
|
1573
|
-
return typeof a === 'undefined';
|
|
1574
|
-
}
|
|
1575
|
-
function isNil(a) {
|
|
1576
|
-
return a == null;
|
|
1577
|
-
}
|
|
1578
|
-
function isNumber(value) {
|
|
1579
|
-
return typeof value === 'number';
|
|
1580
|
-
}
|
|
1581
|
-
function isFunction(value) {
|
|
1582
|
-
return typeof value === 'function';
|
|
1583
|
-
}
|
|
1584
|
-
function isBoolean(value) {
|
|
1585
|
-
return typeof value === 'boolean';
|
|
1586
|
-
}
|
|
1587
|
-
function isObject(value) {
|
|
1588
|
-
return Object.prototype.toString.call(value) === '[object Object]';
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
var canvasMap = {};
|
|
1592
|
-
var defaultCanvasIdCounter = 0;
|
|
1593
|
-
/**
|
|
1594
|
-
* destroy existed canvas with the same id
|
|
1595
|
-
*/
|
|
1596
|
-
|
|
1597
|
-
function cleanExistedCanvas(container, canvas) {
|
|
1598
|
-
if (container) {
|
|
1599
|
-
var id = typeof container === 'string' ? container : container.id || defaultCanvasIdCounter++;
|
|
1600
|
-
|
|
1601
|
-
if (canvasMap[id]) {
|
|
1602
|
-
canvasMap[id].destroy();
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
canvasMap[id] = canvas;
|
|
1606
|
-
}
|
|
1607
|
-
}
|
|
1608
|
-
var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
1609
|
-
|
|
1610
|
-
/**
|
|
1611
|
-
* https://github.com/gre/bezier-easing
|
|
1612
|
-
* BezierEasing - use bezier curve for transition easing function
|
|
1613
|
-
* by Gaëtan Renaudeau 2014 - 2015 – MIT License
|
|
1614
|
-
*/
|
|
1615
|
-
// These values are established by empiricism with tests (tradeoff: performance VS precision)
|
|
1616
|
-
var NEWTON_ITERATIONS = 4;
|
|
1617
|
-
var NEWTON_MIN_SLOPE = 0.001;
|
|
1618
|
-
var SUBDIVISION_PRECISION = 0.0000001;
|
|
1619
|
-
var SUBDIVISION_MAX_ITERATIONS = 10;
|
|
1620
|
-
var kSplineTableSize = 11;
|
|
1621
|
-
var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
|
|
1622
|
-
var float32ArraySupported = typeof Float32Array === 'function';
|
|
1623
|
-
var A = function A(aA1, aA2) {
|
|
1624
|
-
return 1.0 - 3.0 * aA2 + 3.0 * aA1;
|
|
1625
|
-
};
|
|
1626
|
-
var B = function B(aA1, aA2) {
|
|
1627
|
-
return 3.0 * aA2 - 6.0 * aA1;
|
|
1628
|
-
};
|
|
1629
|
-
var C = function C(aA1) {
|
|
1630
|
-
return 3.0 * aA1;
|
|
1631
|
-
}; // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
|
|
1632
|
-
|
|
1633
|
-
var calcBezier = function calcBezier(aT, aA1, aA2) {
|
|
1634
|
-
return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
|
|
1635
|
-
}; // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
|
|
1636
|
-
|
|
1637
|
-
var getSlope = function getSlope(aT, aA1, aA2) {
|
|
1638
|
-
return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
|
|
1639
|
-
};
|
|
1640
|
-
var binarySubdivide = function binarySubdivide(aX, aA, aB, mX1, mX2) {
|
|
1641
|
-
var currentX,
|
|
1642
|
-
currentT,
|
|
1643
|
-
i = 0;
|
|
1644
|
-
|
|
1645
|
-
do {
|
|
1646
|
-
currentT = aA + (aB - aA) / 2.0;
|
|
1647
|
-
currentX = calcBezier(currentT, mX1, mX2) - aX;
|
|
1648
|
-
if (currentX > 0.0) aB = currentT;else aA = currentT;
|
|
1649
|
-
} while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
|
|
1650
|
-
|
|
1651
|
-
return currentT;
|
|
1652
|
-
};
|
|
1653
|
-
var newtonRaphsonIterate = function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
|
|
1654
|
-
for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
|
|
1655
|
-
var currentSlope = getSlope(aGuessT, mX1, mX2);
|
|
1656
|
-
if (currentSlope === 0.0) return aGuessT;
|
|
1657
|
-
var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
|
|
1658
|
-
aGuessT -= currentX / currentSlope;
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
return aGuessT;
|
|
1662
|
-
};
|
|
1663
|
-
var bezier = function bezier(mX1, mY1, mX2, mY2) {
|
|
1664
|
-
if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) throw new Error('bezier x values must be in [0, 1] range');
|
|
1665
|
-
if (mX1 === mY1 && mX2 === mY2) return function (t) {
|
|
1666
|
-
return t;
|
|
1667
|
-
}; // Precompute samples table
|
|
1668
|
-
|
|
1669
|
-
var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
|
|
1670
|
-
|
|
1671
|
-
for (var i = 0; i < kSplineTableSize; ++i) {
|
|
1672
|
-
sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
var getTForX = function getTForX(aX) {
|
|
1676
|
-
var intervalStart = 0.0;
|
|
1677
|
-
var currentSample = 1;
|
|
1678
|
-
var lastSample = kSplineTableSize - 1;
|
|
1679
|
-
|
|
1680
|
-
for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {
|
|
1681
|
-
intervalStart += kSampleStepSize;
|
|
1682
|
-
}
|
|
1683
|
-
|
|
1684
|
-
--currentSample; // Interpolate to provide an initial guess for t
|
|
1685
|
-
|
|
1686
|
-
var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);
|
|
1687
|
-
var guessForT = intervalStart + dist * kSampleStepSize;
|
|
1688
|
-
var initialSlope = getSlope(guessForT, mX1, mX2);
|
|
1689
|
-
if (initialSlope >= NEWTON_MIN_SLOPE) return newtonRaphsonIterate(aX, guessForT, mX1, mX2);else if (initialSlope === 0.0) return guessForT;else {
|
|
1690
|
-
return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
|
|
1691
|
-
}
|
|
1692
|
-
};
|
|
1693
|
-
|
|
1694
|
-
return function (t) {
|
|
1695
|
-
// Because JavaScript number are imprecise, we should guarantee the extremes are right.
|
|
1696
|
-
if (t === 0 || t === 1) return t;
|
|
1697
|
-
return calcBezier(getTForX(t), mY1, mY2);
|
|
1698
|
-
};
|
|
1699
|
-
};
|
|
1700
|
-
|
|
1701
|
-
function clamp(number, boundOne, boundTwo) {
|
|
1702
|
-
if (!boundTwo) {
|
|
1703
|
-
return Math.max(number, boundOne) === boundOne ? number : boundOne;
|
|
1704
|
-
} else if (Math.min(number, boundOne) === number) {
|
|
1705
|
-
return boundOne;
|
|
1706
|
-
} else if (Math.max(number, boundTwo) === number) {
|
|
1707
|
-
return boundTwo;
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
return number;
|
|
1711
|
-
}
|
|
1712
|
-
function getAngle(angle) {
|
|
1713
|
-
if (angle === undefined) {
|
|
1714
|
-
return 0;
|
|
1715
|
-
} else if (angle > 360 || angle < -360) {
|
|
1716
|
-
return angle % 360;
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
return angle;
|
|
1720
|
-
}
|
|
1721
|
-
function createVec3(x, y, z) {
|
|
1722
|
-
if (y === void 0) {
|
|
1723
|
-
y = 0;
|
|
1724
|
-
}
|
|
1331
|
+
return angle;
|
|
1332
|
+
}
|
|
1333
|
+
function createVec3(x, y, z) {
|
|
1334
|
+
if (y === void 0) {
|
|
1335
|
+
y = 0;
|
|
1336
|
+
}
|
|
1725
1337
|
|
|
1726
1338
|
if (z === void 0) {
|
|
1727
1339
|
z = 0;
|
|
@@ -2394,6 +2006,11 @@ var PropertySyntax;
|
|
|
2394
2006
|
*/
|
|
2395
2007
|
|
|
2396
2008
|
PropertySyntax["NUMBER"] = "<number>";
|
|
2009
|
+
/**
|
|
2010
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/angle
|
|
2011
|
+
*/
|
|
2012
|
+
|
|
2013
|
+
PropertySyntax["ANGLE"] = "<angle>";
|
|
2397
2014
|
/**
|
|
2398
2015
|
* <number> with range 0..1
|
|
2399
2016
|
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#opacity_value
|
|
@@ -2421,32 +2038,288 @@ var PropertySyntax;
|
|
|
2421
2038
|
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#formal_syntax
|
|
2422
2039
|
*/
|
|
2423
2040
|
|
|
2424
|
-
PropertySyntax["LENGTH_PERCENTAGE_14"] = "[<length> | <percentage>]{1,4}";
|
|
2425
|
-
/**
|
|
2426
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#list-of-ts
|
|
2427
|
-
*/
|
|
2041
|
+
PropertySyntax["LENGTH_PERCENTAGE_14"] = "[<length> | <percentage>]{1,4}";
|
|
2042
|
+
/**
|
|
2043
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#list-of-ts
|
|
2044
|
+
*/
|
|
2045
|
+
|
|
2046
|
+
PropertySyntax["LIST_OF_POINTS"] = "<list-of-points>";
|
|
2047
|
+
PropertySyntax["PATH"] = "<path>";
|
|
2048
|
+
/**
|
|
2049
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/filter#formal_syntax
|
|
2050
|
+
*/
|
|
2051
|
+
|
|
2052
|
+
PropertySyntax["FILTER"] = "<filter>";
|
|
2053
|
+
PropertySyntax["Z_INDEX"] = "<z-index>";
|
|
2054
|
+
PropertySyntax["OFFSET_PATH"] = "<offset-path>";
|
|
2055
|
+
PropertySyntax["OFFSET_DISTANCE"] = "<offset-distance>";
|
|
2056
|
+
PropertySyntax["CLIP_PATH"] = "<clip-path>";
|
|
2057
|
+
PropertySyntax["TRANSFORM"] = "<transform>";
|
|
2058
|
+
PropertySyntax["TRANSFORM_ORIGIN"] = "<transform-origin>";
|
|
2059
|
+
PropertySyntax["TEXT"] = "<text>";
|
|
2060
|
+
PropertySyntax["TEXT_TRANSFORM"] = "<text-transform>";
|
|
2061
|
+
})(PropertySyntax || (PropertySyntax = {}));
|
|
2062
|
+
|
|
2063
|
+
var StyleValueRegistry = Syringe.defineToken('StyleValueRegistry');
|
|
2064
|
+
|
|
2065
|
+
/**
|
|
2066
|
+
* built-in events for element
|
|
2067
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationEvent
|
|
2068
|
+
*
|
|
2069
|
+
* TODO: use MutationObserver instead
|
|
2070
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
|
|
2071
|
+
*/
|
|
2072
|
+
var ElementEvent;
|
|
2073
|
+
|
|
2074
|
+
(function (ElementEvent) {
|
|
2075
|
+
ElementEvent["DESTROY"] = "destroy";
|
|
2076
|
+
/**
|
|
2077
|
+
* @see https://www.w3.org/TR/DOM-Level-3-Events/#event-type-DOMAttrModified
|
|
2078
|
+
*/
|
|
2079
|
+
|
|
2080
|
+
ElementEvent["ATTR_MODIFIED"] = "DOMAttrModified";
|
|
2081
|
+
/**
|
|
2082
|
+
* it has been inserted
|
|
2083
|
+
* @see https://www.w3.org/TR/DOM-Level-3-Events/#event-type-DOMNodeInserted
|
|
2084
|
+
*/
|
|
2085
|
+
|
|
2086
|
+
ElementEvent["INSERTED"] = "DOMNodeInserted";
|
|
2087
|
+
/**
|
|
2088
|
+
* it has had a child inserted
|
|
2089
|
+
*/
|
|
2090
|
+
|
|
2091
|
+
ElementEvent["CHILD_INSERTED"] = "child-inserted";
|
|
2092
|
+
/**
|
|
2093
|
+
* it is being removed
|
|
2094
|
+
* @see https://www.w3.org/TR/DOM-Level-3-Events/#event-type-DOMNodeRemoved
|
|
2095
|
+
*/
|
|
2096
|
+
|
|
2097
|
+
ElementEvent["REMOVED"] = "removed";
|
|
2098
|
+
/**
|
|
2099
|
+
* it has had a child removed
|
|
2100
|
+
*/
|
|
2101
|
+
|
|
2102
|
+
ElementEvent["CHILD_REMOVED"] = "child-removed";
|
|
2103
|
+
/**
|
|
2104
|
+
* @see https://www.w3.org/TR/DOM-Level-3-Events/#domnodeinsertedintodocument
|
|
2105
|
+
*/
|
|
2106
|
+
|
|
2107
|
+
ElementEvent["MOUNTED"] = "DOMNodeInsertedIntoDocument";
|
|
2108
|
+
/**
|
|
2109
|
+
* @see https://www.w3.org/TR/DOM-Level-3-Events/#domnoderemovedfromdocument
|
|
2110
|
+
*/
|
|
2111
|
+
|
|
2112
|
+
ElementEvent["UNMOUNTED"] = "DOMNodeRemovedFromDocument";
|
|
2113
|
+
ElementEvent["BOUNDS_CHANGED"] = "bounds-changed";
|
|
2114
|
+
ElementEvent["GEOMETRY_BOUNDS_CHANGED"] = "geometry-bounds-changed";
|
|
2115
|
+
/**
|
|
2116
|
+
* trigger when z-index changed
|
|
2117
|
+
*/
|
|
2118
|
+
|
|
2119
|
+
ElementEvent["RENDER_ORDER_CHANGED"] = "render-order-changed";
|
|
2120
|
+
})(ElementEvent || (ElementEvent = {}));
|
|
2121
|
+
|
|
2122
|
+
/**
|
|
2123
|
+
* An DOM-compatible synthetic event implementation that is "forwarded" on behalf of an original
|
|
2124
|
+
* FederatedEvent or native {@link https://dom.spec.whatwg.org/#event Event}.
|
|
2125
|
+
*/
|
|
2126
|
+
|
|
2127
|
+
var FederatedEvent = /*#__PURE__*/function () {
|
|
2128
|
+
/**
|
|
2129
|
+
* The event boundary which manages this event. Propagation can only occur
|
|
2130
|
+
* within the boundary's jurisdiction.
|
|
2131
|
+
*/
|
|
2132
|
+
function FederatedEvent(manager) {
|
|
2133
|
+
this.type = void 0;
|
|
2134
|
+
this.eventPhase = FederatedEvent.prototype.NONE;
|
|
2135
|
+
this.target = void 0;
|
|
2136
|
+
this.bubbles = true;
|
|
2137
|
+
this.cancelBubble = true;
|
|
2138
|
+
this.cancelable = false;
|
|
2139
|
+
this.currentTarget = void 0;
|
|
2140
|
+
this.defaultPrevented = false;
|
|
2141
|
+
this.timeStamp = void 0;
|
|
2142
|
+
this.nativeEvent = void 0;
|
|
2143
|
+
this.originalEvent = void 0;
|
|
2144
|
+
this.propagationStopped = false;
|
|
2145
|
+
this.propagationImmediatelyStopped = false;
|
|
2146
|
+
this.manager = void 0;
|
|
2147
|
+
this.detail = void 0;
|
|
2148
|
+
this.layer = new Point();
|
|
2149
|
+
this.page = new Point();
|
|
2150
|
+
this.canvas = new Point();
|
|
2151
|
+
this.viewport = new Point();
|
|
2152
|
+
this.path = void 0;
|
|
2153
|
+
this.view = void 0;
|
|
2154
|
+
this.which = void 0;
|
|
2155
|
+
this.returnValue = void 0;
|
|
2156
|
+
this.srcElement = void 0;
|
|
2157
|
+
this.composed = false;
|
|
2158
|
+
this.isTrusted = void 0;
|
|
2159
|
+
this.NONE = 0;
|
|
2160
|
+
this.CAPTURING_PHASE = 1;
|
|
2161
|
+
this.AT_TARGET = 2;
|
|
2162
|
+
this.BUBBLING_PHASE = 3;
|
|
2163
|
+
this.manager = manager;
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
var _proto = FederatedEvent.prototype;
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* The propagation path for this event
|
|
2170
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/Event/composedPath
|
|
2171
|
+
*
|
|
2172
|
+
* So composedPath()[0] represents the original target.
|
|
2173
|
+
* @see https://polymer-library.polymer-project.org/3.0/docs/devguide/events#retargeting
|
|
2174
|
+
*/
|
|
2175
|
+
_proto.composedPath = function composedPath() {
|
|
2176
|
+
if (this.manager && (!this.path || this.path[0] !== this.target)) {
|
|
2177
|
+
this.path = this.target ? this.manager.propagationPath(this.target) : [];
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
return this.path;
|
|
2181
|
+
}
|
|
2182
|
+
/**
|
|
2183
|
+
* @deprecated
|
|
2184
|
+
*/
|
|
2185
|
+
;
|
|
2186
|
+
|
|
2187
|
+
/**
|
|
2188
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/Event/preventDefault
|
|
2189
|
+
*/
|
|
2190
|
+
_proto.preventDefault = function preventDefault() {
|
|
2191
|
+
if (this.nativeEvent instanceof Event && this.nativeEvent.cancelable) {
|
|
2192
|
+
this.nativeEvent.preventDefault();
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
this.defaultPrevented = true;
|
|
2196
|
+
}
|
|
2197
|
+
/**
|
|
2198
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/Event/stopImmediatePropagation
|
|
2199
|
+
*/
|
|
2200
|
+
;
|
|
2201
|
+
|
|
2202
|
+
_proto.stopImmediatePropagation = function stopImmediatePropagation() {
|
|
2203
|
+
this.propagationImmediatelyStopped = true;
|
|
2204
|
+
}
|
|
2205
|
+
/**
|
|
2206
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/Event/stopPropagation
|
|
2207
|
+
*/
|
|
2208
|
+
;
|
|
2209
|
+
|
|
2210
|
+
_proto.stopPropagation = function stopPropagation() {
|
|
2211
|
+
this.propagationStopped = true;
|
|
2212
|
+
}
|
|
2213
|
+
/**
|
|
2214
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/view
|
|
2215
|
+
*/
|
|
2216
|
+
;
|
|
2217
|
+
|
|
2218
|
+
/**
|
|
2219
|
+
* added for compatibility with DOM Event,
|
|
2220
|
+
* deprecated props and methods
|
|
2221
|
+
*/
|
|
2222
|
+
_proto.initEvent = function initEvent() {};
|
|
2223
|
+
|
|
2224
|
+
_proto.initUIEvent = function initUIEvent() {};
|
|
2225
|
+
|
|
2226
|
+
_createClass(FederatedEvent, [{
|
|
2227
|
+
key: "name",
|
|
2228
|
+
get:
|
|
2229
|
+
/**
|
|
2230
|
+
* The type of event, supports the following:
|
|
2231
|
+
* * pointerdown
|
|
2232
|
+
* * touchstart
|
|
2233
|
+
* * mousedown
|
|
2234
|
+
* * rightdown
|
|
2235
|
+
* * ...
|
|
2236
|
+
*/
|
|
2237
|
+
|
|
2238
|
+
/**
|
|
2239
|
+
* @deprecated
|
|
2240
|
+
*/
|
|
2241
|
+
function get() {
|
|
2242
|
+
return this.type;
|
|
2243
|
+
}
|
|
2244
|
+
/**
|
|
2245
|
+
* The propagation phase.
|
|
2246
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Event/eventPhase
|
|
2247
|
+
*/
|
|
2248
|
+
|
|
2249
|
+
}, {
|
|
2250
|
+
key: "layerX",
|
|
2251
|
+
get: function get() {
|
|
2252
|
+
return this.layer.x;
|
|
2253
|
+
}
|
|
2254
|
+
}, {
|
|
2255
|
+
key: "layerY",
|
|
2256
|
+
get: function get() {
|
|
2257
|
+
return this.layer.y;
|
|
2258
|
+
}
|
|
2259
|
+
/**
|
|
2260
|
+
* The coordinates of the event relative to the DOM document.
|
|
2261
|
+
* This is a non-standard property.
|
|
2262
|
+
* relative to the DOM document.
|
|
2263
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/MouseEvent/pageX
|
|
2264
|
+
*/
|
|
2428
2265
|
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2266
|
+
}, {
|
|
2267
|
+
key: "pageX",
|
|
2268
|
+
get: function get() {
|
|
2269
|
+
return this.page.x;
|
|
2270
|
+
}
|
|
2271
|
+
}, {
|
|
2272
|
+
key: "pageY",
|
|
2273
|
+
get: function get() {
|
|
2274
|
+
return this.page.y;
|
|
2275
|
+
}
|
|
2276
|
+
/**
|
|
2277
|
+
* relative to Canvas, origin is left-top
|
|
2278
|
+
*/
|
|
2434
2279
|
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
}
|
|
2280
|
+
}, {
|
|
2281
|
+
key: "x",
|
|
2282
|
+
get: function get() {
|
|
2283
|
+
return this.canvas.x;
|
|
2284
|
+
}
|
|
2285
|
+
}, {
|
|
2286
|
+
key: "y",
|
|
2287
|
+
get: function get() {
|
|
2288
|
+
return this.canvas.y;
|
|
2289
|
+
}
|
|
2290
|
+
}, {
|
|
2291
|
+
key: "canvasX",
|
|
2292
|
+
get: function get() {
|
|
2293
|
+
return this.canvas.x;
|
|
2294
|
+
}
|
|
2295
|
+
}, {
|
|
2296
|
+
key: "canvasY",
|
|
2297
|
+
get: function get() {
|
|
2298
|
+
return this.canvas.y;
|
|
2299
|
+
}
|
|
2300
|
+
/**
|
|
2301
|
+
* relative to Viewport, account for Camera
|
|
2302
|
+
*/
|
|
2445
2303
|
|
|
2446
|
-
|
|
2304
|
+
}, {
|
|
2305
|
+
key: "viewportX",
|
|
2306
|
+
get: function get() {
|
|
2307
|
+
return this.viewport.x;
|
|
2308
|
+
}
|
|
2309
|
+
}, {
|
|
2310
|
+
key: "viewportY",
|
|
2311
|
+
get: function get() {
|
|
2312
|
+
return this.viewport.y;
|
|
2313
|
+
}
|
|
2314
|
+
}, {
|
|
2315
|
+
key: "propagationPath",
|
|
2316
|
+
get: function get() {
|
|
2317
|
+
return this.composedPath();
|
|
2318
|
+
}
|
|
2319
|
+
}]);
|
|
2447
2320
|
|
|
2448
|
-
|
|
2449
|
-
|
|
2321
|
+
return FederatedEvent;
|
|
2322
|
+
}();
|
|
2450
2323
|
|
|
2451
2324
|
/**
|
|
2452
2325
|
* @see https://developer.mozilla.org/en-US/docs/Web/Events/Creating_and_triggering_events
|
|
@@ -2991,6 +2864,37 @@ var Sortable = function Sortable() {
|
|
|
2991
2864
|
};
|
|
2992
2865
|
Sortable.tag = 'c-sortable';
|
|
2993
2866
|
|
|
2867
|
+
var MutationEvent = /*#__PURE__*/function (_FederatedEvent) {
|
|
2868
|
+
_inheritsLoose(MutationEvent, _FederatedEvent);
|
|
2869
|
+
|
|
2870
|
+
function MutationEvent(typeArg, relatedNode, prevValue, newValue, attrName, attrChange, prevParsedValue, newParsedValue) {
|
|
2871
|
+
var _this;
|
|
2872
|
+
|
|
2873
|
+
_this = _FederatedEvent.call(this, null) || this;
|
|
2874
|
+
_this.relatedNode = void 0;
|
|
2875
|
+
_this.prevValue = void 0;
|
|
2876
|
+
_this.newValue = void 0;
|
|
2877
|
+
_this.attrName = void 0;
|
|
2878
|
+
_this.attrChange = void 0;
|
|
2879
|
+
_this.prevParsedValue = void 0;
|
|
2880
|
+
_this.newParsedValue = void 0;
|
|
2881
|
+
_this.relatedNode = relatedNode;
|
|
2882
|
+
_this.prevValue = prevValue;
|
|
2883
|
+
_this.newValue = newValue;
|
|
2884
|
+
_this.attrName = attrName;
|
|
2885
|
+
_this.attrChange = attrChange;
|
|
2886
|
+
_this.prevParsedValue = prevParsedValue;
|
|
2887
|
+
_this.newParsedValue = newParsedValue;
|
|
2888
|
+
_this.type = typeArg;
|
|
2889
|
+
return _this;
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2892
|
+
return MutationEvent;
|
|
2893
|
+
}(FederatedEvent);
|
|
2894
|
+
MutationEvent.ADDITION = 2;
|
|
2895
|
+
MutationEvent.MODIFICATION = 1;
|
|
2896
|
+
MutationEvent.REMOVAL = 3;
|
|
2897
|
+
|
|
2994
2898
|
var entityCounter = 0;
|
|
2995
2899
|
/**
|
|
2996
2900
|
* Has following capabilities:
|
|
@@ -3149,6 +3053,24 @@ var Element = /*#__PURE__*/function (_Node) {
|
|
|
3149
3053
|
_proto.querySelectorAll = function querySelectorAll(selectors) {
|
|
3150
3054
|
return this.sceneGraphService.querySelectorAll(selectors, this);
|
|
3151
3055
|
}
|
|
3056
|
+
/**
|
|
3057
|
+
* should traverses the element and its parents (heading toward the document root)
|
|
3058
|
+
* until it finds a node that matches the specified CSS selector.
|
|
3059
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/API/Element/closest
|
|
3060
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#polyfill
|
|
3061
|
+
*/
|
|
3062
|
+
;
|
|
3063
|
+
|
|
3064
|
+
_proto.closest = function closest(selectors) {
|
|
3065
|
+
var el = this;
|
|
3066
|
+
|
|
3067
|
+
do {
|
|
3068
|
+
if (this.sceneGraphService.matches(selectors, el)) return el;
|
|
3069
|
+
el = el.parentElement;
|
|
3070
|
+
} while (el !== null);
|
|
3071
|
+
|
|
3072
|
+
return null;
|
|
3073
|
+
}
|
|
3152
3074
|
/**
|
|
3153
3075
|
* search in scene group, but should not include itself
|
|
3154
3076
|
*/
|
|
@@ -6989,6 +6911,8 @@ function parseDimension(unitRegExp, string) {
|
|
|
6989
6911
|
if (isFinite(Number(string))) {
|
|
6990
6912
|
if ('px'.search(unitRegExp) >= 0) {
|
|
6991
6913
|
return new CSSUnitValue(Number(string), 'px');
|
|
6914
|
+
} else if ('deg'.search(unitRegExp) >= 0) {
|
|
6915
|
+
return new CSSUnitValue(Number(string), 'deg');
|
|
6992
6916
|
}
|
|
6993
6917
|
}
|
|
6994
6918
|
|
|
@@ -9199,6 +9123,75 @@ function convertKeyword2Percent(keyword) {
|
|
|
9199
9123
|
return keyword;
|
|
9200
9124
|
}
|
|
9201
9125
|
|
|
9126
|
+
var CSSPropertyAngle = {
|
|
9127
|
+
parser: parseAngle,
|
|
9128
|
+
mixer: mergeDimensions,
|
|
9129
|
+
calculator: function calculator(name, oldParsed, parsed, object) {
|
|
9130
|
+
return new CSSUnitValue(convertAngleUnit(parsed), 'deg');
|
|
9131
|
+
}
|
|
9132
|
+
};
|
|
9133
|
+
|
|
9134
|
+
/**
|
|
9135
|
+
* @see /zh/docs/api/basic/display-object#clippath
|
|
9136
|
+
* @example
|
|
9137
|
+
const image = new Image({
|
|
9138
|
+
style: {
|
|
9139
|
+
width: 200,
|
|
9140
|
+
height: 200,
|
|
9141
|
+
clipPath: new Circle({
|
|
9142
|
+
style: {
|
|
9143
|
+
x: 100, // 处于被裁剪图形局部坐标系下
|
|
9144
|
+
y: 100,
|
|
9145
|
+
r: 50,
|
|
9146
|
+
},
|
|
9147
|
+
}),
|
|
9148
|
+
}
|
|
9149
|
+
});
|
|
9150
|
+
*/
|
|
9151
|
+
|
|
9152
|
+
var CSSPropertyClipPath = {
|
|
9153
|
+
calculator: function calculator(name, oldClipPath, newClipPath, object) {
|
|
9154
|
+
// unset
|
|
9155
|
+
if (newClipPath instanceof CSSKeywordValue) {
|
|
9156
|
+
newClipPath = null;
|
|
9157
|
+
} // clear ref to old clip path
|
|
9158
|
+
|
|
9159
|
+
|
|
9160
|
+
if (oldClipPath && oldClipPath !== newClipPath && oldClipPath.style.clipPathTargets) {
|
|
9161
|
+
var index = oldClipPath.style.clipPathTargets.indexOf(object);
|
|
9162
|
+
oldClipPath.style.clipPathTargets.splice(index, 1);
|
|
9163
|
+
}
|
|
9164
|
+
|
|
9165
|
+
if (newClipPath) {
|
|
9166
|
+
if (!newClipPath.style.clipPathTargets) {
|
|
9167
|
+
newClipPath.style.clipPathTargets = [];
|
|
9168
|
+
}
|
|
9169
|
+
|
|
9170
|
+
newClipPath.style.clipPathTargets.push(object);
|
|
9171
|
+
}
|
|
9172
|
+
|
|
9173
|
+
dirtifyToRoot(object);
|
|
9174
|
+
return newClipPath;
|
|
9175
|
+
}
|
|
9176
|
+
};
|
|
9177
|
+
|
|
9178
|
+
var CSSPropertyColor = {
|
|
9179
|
+
parser: parseColor,
|
|
9180
|
+
calculator: function calculator(name, oldParsed, parsed, object, registry) {
|
|
9181
|
+
if (parsed instanceof CSSKeywordValue) {
|
|
9182
|
+
// 'unset' 'none'
|
|
9183
|
+
return new CSSRGB(0, 0, 0, 0, parsed.value === 'none');
|
|
9184
|
+
}
|
|
9185
|
+
|
|
9186
|
+
return parsed;
|
|
9187
|
+
},
|
|
9188
|
+
mixer: mergeColors
|
|
9189
|
+
};
|
|
9190
|
+
|
|
9191
|
+
var CSSPropertyFilter = {
|
|
9192
|
+
parser: parseFilter
|
|
9193
|
+
};
|
|
9194
|
+
|
|
9202
9195
|
function getFontSize(object) {
|
|
9203
9196
|
var fontSize = object.parsedStyle.fontSize;
|
|
9204
9197
|
|
|
@@ -9253,38 +9246,92 @@ var CSSPropertyLengthOrPercentage = {
|
|
|
9253
9246
|
} else if (computed.unit === UnitType.kRems) {
|
|
9254
9247
|
var _object$ownerDocument;
|
|
9255
9248
|
|
|
9256
|
-
if (object === null || object === void 0 ? void 0 : (_object$ownerDocument = object.ownerDocument) === null || _object$ownerDocument === void 0 ? void 0 : _object$ownerDocument.documentElement) {
|
|
9257
|
-
var _fontSize = getFontSize(object.ownerDocument.documentElement);
|
|
9249
|
+
if (object === null || object === void 0 ? void 0 : (_object$ownerDocument = object.ownerDocument) === null || _object$ownerDocument === void 0 ? void 0 : _object$ownerDocument.documentElement) {
|
|
9250
|
+
var _fontSize = getFontSize(object.ownerDocument.documentElement);
|
|
9251
|
+
|
|
9252
|
+
_fontSize.value *= computed.value;
|
|
9253
|
+
return _fontSize;
|
|
9254
|
+
}
|
|
9255
|
+
|
|
9256
|
+
return new CSSUnitValue(0, 'px');
|
|
9257
|
+
}
|
|
9258
|
+
} else {
|
|
9259
|
+
// remove listener if exists
|
|
9260
|
+
// registry.unregisterParentGeometryBoundsChangedHandler(object, name);
|
|
9261
|
+
// return absolute value
|
|
9262
|
+
return computed.clone();
|
|
9263
|
+
}
|
|
9264
|
+
} // private nameToBoundsIndex(name: string): number {
|
|
9265
|
+
// if (name === 'x' || name === 'cx' || name === 'width') {
|
|
9266
|
+
// return 0;
|
|
9267
|
+
// } else if (name === 'y' || name === 'cy' || name === 'height') {
|
|
9268
|
+
// return 1;
|
|
9269
|
+
// }
|
|
9270
|
+
// return 2;
|
|
9271
|
+
// }
|
|
9272
|
+
// private calculateUsedValueWithParentBounds(object: DisplayObject, name: string) {
|
|
9273
|
+
// const bounds = (object.parentElement as DisplayObject).getGeometryBounds();
|
|
9274
|
+
// const computedValue = object.computedStyle[name].value;
|
|
9275
|
+
// return new CSSUnitValue(
|
|
9276
|
+
// (bounds.halfExtents[this.nameToBoundsIndex(name)] * 2 * computedValue) / 100,
|
|
9277
|
+
// 'px',
|
|
9278
|
+
// );
|
|
9279
|
+
// }
|
|
9280
|
+
|
|
9281
|
+
};
|
|
9282
|
+
|
|
9283
|
+
/**
|
|
9284
|
+
* format to Tuple2<CSSUnitValue>
|
|
9285
|
+
*
|
|
9286
|
+
* @example
|
|
9287
|
+
* rect.style.lineDash = 10;
|
|
9288
|
+
* rect.style.lineDash = [10, 10];
|
|
9289
|
+
* rect.style.lineDash = '10 10';
|
|
9290
|
+
*/
|
|
9291
|
+
|
|
9292
|
+
var CSSPropertyLengthOrPercentage12 = {
|
|
9293
|
+
parser: function parser(radius) {
|
|
9294
|
+
var parsed = parseDimensionArray(isNumber(radius) ? [radius] : radius);
|
|
9295
|
+
var formatted;
|
|
9296
|
+
|
|
9297
|
+
if (parsed.length === 1) {
|
|
9298
|
+
formatted = [parsed[0], parsed[0]];
|
|
9299
|
+
} else {
|
|
9300
|
+
formatted = [parsed[0], parsed[1]];
|
|
9301
|
+
}
|
|
9302
|
+
|
|
9303
|
+
return formatted;
|
|
9304
|
+
},
|
|
9305
|
+
mixer: mergeDimensionList
|
|
9306
|
+
};
|
|
9307
|
+
|
|
9308
|
+
/**
|
|
9309
|
+
* used in rounded rect
|
|
9310
|
+
*
|
|
9311
|
+
* @example
|
|
9312
|
+
* rect.style.radius = 10;
|
|
9313
|
+
* rect.style.radius = '10 10';
|
|
9314
|
+
* rect.style.radius = '10 10 10 10';
|
|
9315
|
+
*/
|
|
9258
9316
|
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9317
|
+
var CSSPropertyLengthOrPercentage14 = {
|
|
9318
|
+
parser: function parser(radius) {
|
|
9319
|
+
var parsed = parseDimensionArray(isNumber(radius) ? [radius] : radius);
|
|
9320
|
+
var formatted; // format to Tuple<CSSUnitValue>
|
|
9262
9321
|
|
|
9263
|
-
|
|
9264
|
-
|
|
9322
|
+
if (parsed.length === 1) {
|
|
9323
|
+
formatted = [parsed[0], parsed[0], parsed[0], parsed[0]];
|
|
9324
|
+
} else if (parsed.length === 2) {
|
|
9325
|
+
formatted = [parsed[0], parsed[1], parsed[0], parsed[1]];
|
|
9326
|
+
} else if (parsed.length === 3) {
|
|
9327
|
+
formatted = [parsed[0], parsed[1], parsed[2], parsed[1]];
|
|
9265
9328
|
} else {
|
|
9266
|
-
|
|
9267
|
-
// registry.unregisterParentGeometryBoundsChangedHandler(object, name);
|
|
9268
|
-
// return absolute value
|
|
9269
|
-
return computed.clone();
|
|
9329
|
+
formatted = [parsed[0], parsed[1], parsed[2], parsed[3]];
|
|
9270
9330
|
}
|
|
9271
|
-
} // private nameToBoundsIndex(name: string): number {
|
|
9272
|
-
// if (name === 'x' || name === 'cx' || name === 'width') {
|
|
9273
|
-
// return 0;
|
|
9274
|
-
// } else if (name === 'y' || name === 'cy' || name === 'height') {
|
|
9275
|
-
// return 1;
|
|
9276
|
-
// }
|
|
9277
|
-
// return 2;
|
|
9278
|
-
// }
|
|
9279
|
-
// private calculateUsedValueWithParentBounds(object: DisplayObject, name: string) {
|
|
9280
|
-
// const bounds = (object.parentElement as DisplayObject).getGeometryBounds();
|
|
9281
|
-
// const computedValue = object.computedStyle[name].value;
|
|
9282
|
-
// return new CSSUnitValue(
|
|
9283
|
-
// (bounds.halfExtents[this.nameToBoundsIndex(name)] * 2 * computedValue) / 100,
|
|
9284
|
-
// 'px',
|
|
9285
|
-
// );
|
|
9286
|
-
// }
|
|
9287
9331
|
|
|
9332
|
+
return formatted;
|
|
9333
|
+
},
|
|
9334
|
+
mixer: mergeDimensionList
|
|
9288
9335
|
};
|
|
9289
9336
|
|
|
9290
9337
|
/**
|
|
@@ -9358,90 +9405,24 @@ var CSSPropertyLocalPosition = {
|
|
|
9358
9405
|
}
|
|
9359
9406
|
};
|
|
9360
9407
|
|
|
9361
|
-
|
|
9362
|
-
* opacity
|
|
9363
|
-
*/
|
|
9364
|
-
|
|
9365
|
-
var CSSPropertyOpacity = {
|
|
9408
|
+
var CSSPropertyOffsetDistance = {
|
|
9366
9409
|
parser: parseNumber,
|
|
9367
|
-
mixer: clampedMergeNumbers(0, 1)
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
parser: parseColor,
|
|
9372
|
-
calculator: function calculator(name, oldParsed, parsed, object, registry) {
|
|
9373
|
-
if (parsed instanceof CSSKeywordValue) {
|
|
9374
|
-
// 'unset' 'none'
|
|
9375
|
-
return new CSSRGB(0, 0, 0, 0, parsed.value === 'none');
|
|
9376
|
-
}
|
|
9377
|
-
|
|
9378
|
-
return parsed;
|
|
9379
|
-
},
|
|
9380
|
-
mixer: mergeColors
|
|
9381
|
-
};
|
|
9382
|
-
|
|
9383
|
-
var CSSPropertyFilter = {
|
|
9384
|
-
parser: parseFilter
|
|
9385
|
-
};
|
|
9386
|
-
|
|
9387
|
-
/**
|
|
9388
|
-
* format to Tuple2<CSSUnitValue>
|
|
9389
|
-
*
|
|
9390
|
-
* @example
|
|
9391
|
-
* rect.style.lineDash = 10;
|
|
9392
|
-
* rect.style.lineDash = [10, 10];
|
|
9393
|
-
* rect.style.lineDash = '10 10';
|
|
9394
|
-
*/
|
|
9395
|
-
|
|
9396
|
-
var CSSPropertyLengthOrPercentage12 = {
|
|
9397
|
-
parser: function parser(radius) {
|
|
9398
|
-
var parsed = parseDimensionArray(isNumber(radius) ? [radius] : radius);
|
|
9399
|
-
var formatted;
|
|
9400
|
-
|
|
9401
|
-
if (parsed.length === 1) {
|
|
9402
|
-
formatted = [parsed[0], parsed[0]];
|
|
9403
|
-
} else {
|
|
9404
|
-
formatted = [parsed[0], parsed[1]];
|
|
9410
|
+
mixer: clampedMergeNumbers(0, 1),
|
|
9411
|
+
postProcessor: function postProcessor(object) {
|
|
9412
|
+
if (!object.attributes.offsetPath) {
|
|
9413
|
+
return;
|
|
9405
9414
|
}
|
|
9406
9415
|
|
|
9407
|
-
|
|
9408
|
-
},
|
|
9409
|
-
mixer: mergeDimensionList
|
|
9410
|
-
};
|
|
9411
|
-
|
|
9412
|
-
/**
|
|
9413
|
-
* used in rounded rect
|
|
9414
|
-
*
|
|
9415
|
-
* @example
|
|
9416
|
-
* rect.style.radius = 10;
|
|
9417
|
-
* rect.style.radius = '10 10';
|
|
9418
|
-
* rect.style.radius = '10 10 10 10';
|
|
9419
|
-
*/
|
|
9416
|
+
var offsetPathNodeName = object.attributes.offsetPath.nodeName;
|
|
9420
9417
|
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
var parsed = parseDimensionArray(isNumber(radius) ? [radius] : radius);
|
|
9424
|
-
var formatted; // format to Tuple<CSSUnitValue>
|
|
9418
|
+
if (offsetPathNodeName === Shape.LINE || offsetPathNodeName === Shape.PATH || offsetPathNodeName === Shape.POLYLINE) {
|
|
9419
|
+
var point = object.attributes.offsetPath.getPoint(object.parsedStyle.offsetDistance.value);
|
|
9425
9420
|
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
formatted = [parsed[0], parsed[1], parsed[0], parsed[1]];
|
|
9430
|
-
} else if (parsed.length === 3) {
|
|
9431
|
-
formatted = [parsed[0], parsed[1], parsed[2], parsed[1]];
|
|
9432
|
-
} else {
|
|
9433
|
-
formatted = [parsed[0], parsed[1], parsed[2], parsed[3]];
|
|
9421
|
+
if (point) {
|
|
9422
|
+
object.setLocalPosition(point.x, point.y);
|
|
9423
|
+
}
|
|
9434
9424
|
}
|
|
9435
|
-
|
|
9436
|
-
return formatted;
|
|
9437
|
-
},
|
|
9438
|
-
mixer: mergeDimensionList
|
|
9439
|
-
};
|
|
9440
|
-
|
|
9441
|
-
var CSSPropertyShadowBlur = {
|
|
9442
|
-
parser: CSSPropertyLengthOrPercentage.parser,
|
|
9443
|
-
mixer: clampedMergeNumbers(0, Infinity),
|
|
9444
|
-
calculator: CSSPropertyLengthOrPercentage.calculator
|
|
9425
|
+
}
|
|
9445
9426
|
};
|
|
9446
9427
|
|
|
9447
9428
|
var CSSPropertyOffsetPath = {
|
|
@@ -9464,43 +9445,118 @@ var CSSPropertyOffsetPath = {
|
|
|
9464
9445
|
}
|
|
9465
9446
|
};
|
|
9466
9447
|
|
|
9467
|
-
|
|
9448
|
+
/**
|
|
9449
|
+
* opacity
|
|
9450
|
+
*/
|
|
9451
|
+
|
|
9452
|
+
var CSSPropertyOpacity = {
|
|
9468
9453
|
parser: parseNumber,
|
|
9469
|
-
mixer: clampedMergeNumbers(0, 1)
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9454
|
+
mixer: clampedMergeNumbers(0, 1)
|
|
9455
|
+
};
|
|
9456
|
+
|
|
9457
|
+
var CSSPropertyPath = {
|
|
9458
|
+
/**
|
|
9459
|
+
* path2Curve
|
|
9460
|
+
*/
|
|
9461
|
+
parser: parsePath,
|
|
9462
|
+
calculator: function calculator(name, oldParsed, parsed) {
|
|
9463
|
+
// unset
|
|
9464
|
+
if (parsed instanceof CSSKeywordValue && parsed.value === 'unset') {
|
|
9465
|
+
return {
|
|
9466
|
+
absolutePath: [],
|
|
9467
|
+
hasArc: false,
|
|
9468
|
+
segments: [],
|
|
9469
|
+
polygons: [],
|
|
9470
|
+
polylines: [],
|
|
9471
|
+
curve: [],
|
|
9472
|
+
totalLength: 0,
|
|
9473
|
+
curveSegments: [],
|
|
9474
|
+
zCommandIndexes: [],
|
|
9475
|
+
rect: new Rectangle(0, 0, 0, 0)
|
|
9476
|
+
};
|
|
9473
9477
|
}
|
|
9474
9478
|
|
|
9475
|
-
|
|
9479
|
+
return parsed;
|
|
9480
|
+
},
|
|
9481
|
+
mixer: mergePaths,
|
|
9476
9482
|
|
|
9477
|
-
|
|
9478
|
-
|
|
9483
|
+
/**
|
|
9484
|
+
* update local position
|
|
9485
|
+
*/
|
|
9486
|
+
postProcessor: function postProcessor(object) {
|
|
9487
|
+
if (object.nodeName === Shape.PATH) {
|
|
9488
|
+
var _object$parsedStyle = object.parsedStyle,
|
|
9489
|
+
_object$parsedStyle$d = _object$parsedStyle.defX,
|
|
9490
|
+
defX = _object$parsedStyle$d === void 0 ? 0 : _object$parsedStyle$d,
|
|
9491
|
+
_object$parsedStyle$d2 = _object$parsedStyle.defY,
|
|
9492
|
+
defY = _object$parsedStyle$d2 === void 0 ? 0 : _object$parsedStyle$d2;
|
|
9493
|
+
object.setLocalPosition(defX, defY);
|
|
9494
|
+
}
|
|
9495
|
+
}
|
|
9496
|
+
};
|
|
9479
9497
|
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9498
|
+
var CSSPropertyPoints = {
|
|
9499
|
+
parser: parsePoints,
|
|
9500
|
+
|
|
9501
|
+
/**
|
|
9502
|
+
* update local position
|
|
9503
|
+
*/
|
|
9504
|
+
postProcessor: function postProcessor(object) {
|
|
9505
|
+
if (object.nodeName === Shape.POLYGON || object.nodeName === Shape.POLYLINE) {
|
|
9506
|
+
var _object$parsedStyle = object.parsedStyle,
|
|
9507
|
+
defX = _object$parsedStyle.defX,
|
|
9508
|
+
defY = _object$parsedStyle.defY;
|
|
9509
|
+
object.setLocalPosition(defX, defY);
|
|
9483
9510
|
}
|
|
9484
9511
|
}
|
|
9485
9512
|
};
|
|
9486
9513
|
|
|
9487
|
-
var
|
|
9488
|
-
parser:
|
|
9514
|
+
var CSSPropertyShadowBlur = {
|
|
9515
|
+
parser: CSSPropertyLengthOrPercentage.parser,
|
|
9516
|
+
mixer: clampedMergeNumbers(0, Infinity),
|
|
9517
|
+
calculator: CSSPropertyLengthOrPercentage.calculator
|
|
9518
|
+
};
|
|
9519
|
+
|
|
9520
|
+
var CSSPropertyText = {
|
|
9521
|
+
calculator: function calculator(name, oldParsed, parsed, object) {
|
|
9522
|
+
if (parsed instanceof CSSKeywordValue) {
|
|
9523
|
+
if (parsed.value === 'unset') {
|
|
9524
|
+
return '';
|
|
9525
|
+
} else {
|
|
9526
|
+
return parsed.value;
|
|
9527
|
+
}
|
|
9528
|
+
}
|
|
9529
|
+
|
|
9530
|
+
return parsed;
|
|
9531
|
+
},
|
|
9489
9532
|
postProcessor: function postProcessor(object) {
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
var parentSortable = parentEntity.sortable;
|
|
9533
|
+
object.nodeValue = "" + object.parsedStyle.text || '';
|
|
9534
|
+
}
|
|
9535
|
+
};
|
|
9494
9536
|
|
|
9495
|
-
|
|
9496
|
-
|
|
9497
|
-
|
|
9537
|
+
/**
|
|
9538
|
+
* it must transform after text get parsed
|
|
9539
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/text-transform
|
|
9540
|
+
*/
|
|
9541
|
+
var CSSPropertyTextTransform = {
|
|
9542
|
+
calculator: function calculator(name, oldParsed, parsed, object) {
|
|
9543
|
+
var rawText = object.getAttribute('text');
|
|
9498
9544
|
|
|
9545
|
+
if (rawText) {
|
|
9546
|
+
var transformedText = rawText;
|
|
9499
9547
|
|
|
9500
|
-
if (
|
|
9501
|
-
|
|
9548
|
+
if (parsed.value === 'capitalize') {
|
|
9549
|
+
transformedText = rawText.charAt(0).toUpperCase() + rawText.slice(1);
|
|
9550
|
+
} else if (parsed.value === 'lowercase') {
|
|
9551
|
+
transformedText = rawText.toLowerCase();
|
|
9552
|
+
} else if (parsed.value === 'uppercase') {
|
|
9553
|
+
transformedText = rawText.toUpperCase();
|
|
9502
9554
|
}
|
|
9555
|
+
|
|
9556
|
+
object.parsedStyle.text = transformedText;
|
|
9503
9557
|
}
|
|
9558
|
+
|
|
9559
|
+
return parsed;
|
|
9504
9560
|
}
|
|
9505
9561
|
};
|
|
9506
9562
|
|
|
@@ -9632,143 +9688,23 @@ var CSSPropertyTransformOrigin = {
|
|
|
9632
9688
|
parser: parseTransformOrigin
|
|
9633
9689
|
};
|
|
9634
9690
|
|
|
9635
|
-
var
|
|
9636
|
-
|
|
9637
|
-
* path2Curve
|
|
9638
|
-
*/
|
|
9639
|
-
parser: parsePath,
|
|
9640
|
-
calculator: function calculator(name, oldParsed, parsed) {
|
|
9641
|
-
// unset
|
|
9642
|
-
if (parsed instanceof CSSKeywordValue && parsed.value === 'unset') {
|
|
9643
|
-
return {
|
|
9644
|
-
absolutePath: [],
|
|
9645
|
-
hasArc: false,
|
|
9646
|
-
segments: [],
|
|
9647
|
-
polygons: [],
|
|
9648
|
-
polylines: [],
|
|
9649
|
-
curve: [],
|
|
9650
|
-
totalLength: 0,
|
|
9651
|
-
curveSegments: [],
|
|
9652
|
-
zCommandIndexes: [],
|
|
9653
|
-
rect: new Rectangle(0, 0, 0, 0)
|
|
9654
|
-
};
|
|
9655
|
-
}
|
|
9656
|
-
|
|
9657
|
-
return parsed;
|
|
9658
|
-
},
|
|
9659
|
-
mixer: mergePaths,
|
|
9660
|
-
|
|
9661
|
-
/**
|
|
9662
|
-
* update local position
|
|
9663
|
-
*/
|
|
9664
|
-
postProcessor: function postProcessor(object) {
|
|
9665
|
-
if (object.nodeName === Shape.PATH) {
|
|
9666
|
-
var _object$parsedStyle = object.parsedStyle,
|
|
9667
|
-
_object$parsedStyle$d = _object$parsedStyle.defX,
|
|
9668
|
-
defX = _object$parsedStyle$d === void 0 ? 0 : _object$parsedStyle$d,
|
|
9669
|
-
_object$parsedStyle$d2 = _object$parsedStyle.defY,
|
|
9670
|
-
defY = _object$parsedStyle$d2 === void 0 ? 0 : _object$parsedStyle$d2;
|
|
9671
|
-
object.setLocalPosition(defX, defY);
|
|
9672
|
-
}
|
|
9673
|
-
}
|
|
9674
|
-
};
|
|
9675
|
-
|
|
9676
|
-
var CSSPropertyPoints = {
|
|
9677
|
-
parser: parsePoints,
|
|
9678
|
-
|
|
9679
|
-
/**
|
|
9680
|
-
* update local position
|
|
9681
|
-
*/
|
|
9682
|
-
postProcessor: function postProcessor(object) {
|
|
9683
|
-
if (object.nodeName === Shape.POLYGON || object.nodeName === Shape.POLYLINE) {
|
|
9684
|
-
var _object$parsedStyle = object.parsedStyle,
|
|
9685
|
-
defX = _object$parsedStyle.defX,
|
|
9686
|
-
defY = _object$parsedStyle.defY;
|
|
9687
|
-
object.setLocalPosition(defX, defY);
|
|
9688
|
-
}
|
|
9689
|
-
}
|
|
9690
|
-
};
|
|
9691
|
-
|
|
9692
|
-
/**
|
|
9693
|
-
* @see /zh/docs/api/basic/display-object#clippath
|
|
9694
|
-
* @example
|
|
9695
|
-
const image = new Image({
|
|
9696
|
-
style: {
|
|
9697
|
-
width: 200,
|
|
9698
|
-
height: 200,
|
|
9699
|
-
clipPath: new Circle({
|
|
9700
|
-
style: {
|
|
9701
|
-
x: 100, // 处于被裁剪图形局部坐标系下
|
|
9702
|
-
y: 100,
|
|
9703
|
-
r: 50,
|
|
9704
|
-
},
|
|
9705
|
-
}),
|
|
9706
|
-
}
|
|
9707
|
-
});
|
|
9708
|
-
*/
|
|
9709
|
-
|
|
9710
|
-
var CSSPropertyClipPath = {
|
|
9711
|
-
calculator: function calculator(name, oldClipPath, newClipPath, object) {
|
|
9712
|
-
// unset
|
|
9713
|
-
if (newClipPath instanceof CSSKeywordValue) {
|
|
9714
|
-
newClipPath = null;
|
|
9715
|
-
} // clear ref to old clip path
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
if (oldClipPath && oldClipPath !== newClipPath && oldClipPath.style.clipPathTargets) {
|
|
9719
|
-
var index = oldClipPath.style.clipPathTargets.indexOf(object);
|
|
9720
|
-
oldClipPath.style.clipPathTargets.splice(index, 1);
|
|
9721
|
-
}
|
|
9722
|
-
|
|
9723
|
-
if (newClipPath) {
|
|
9724
|
-
if (!newClipPath.style.clipPathTargets) {
|
|
9725
|
-
newClipPath.style.clipPathTargets = [];
|
|
9726
|
-
}
|
|
9727
|
-
|
|
9728
|
-
newClipPath.style.clipPathTargets.push(object);
|
|
9729
|
-
}
|
|
9730
|
-
|
|
9731
|
-
dirtifyToRoot(object);
|
|
9732
|
-
return newClipPath;
|
|
9733
|
-
}
|
|
9734
|
-
};
|
|
9735
|
-
|
|
9736
|
-
var CSSPropertyText = {
|
|
9737
|
-
calculator: function calculator(name, oldParsed, parsed, object) {
|
|
9738
|
-
if (parsed instanceof CSSKeywordValue) {
|
|
9739
|
-
if (parsed.value === 'unset') {
|
|
9740
|
-
return '';
|
|
9741
|
-
} else {
|
|
9742
|
-
return parsed.value;
|
|
9743
|
-
}
|
|
9744
|
-
}
|
|
9745
|
-
|
|
9746
|
-
return parsed;
|
|
9747
|
-
},
|
|
9691
|
+
var CSSPropertyZIndex = {
|
|
9692
|
+
parser: parseNumber,
|
|
9748
9693
|
postProcessor: function postProcessor(object) {
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9694
|
+
if (object.parentNode) {
|
|
9695
|
+
var parentEntity = object.parentNode;
|
|
9696
|
+
var parentRenderable = parentEntity.renderable;
|
|
9697
|
+
var parentSortable = parentEntity.sortable;
|
|
9752
9698
|
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9699
|
+
if (parentRenderable) {
|
|
9700
|
+
parentRenderable.dirty = true;
|
|
9701
|
+
} // need re-sort on parent
|
|
9756
9702
|
|
|
9757
|
-
if (rawText) {
|
|
9758
|
-
var transformedText = rawText;
|
|
9759
9703
|
|
|
9760
|
-
if (
|
|
9761
|
-
|
|
9762
|
-
} else if (parsed.value === 'lowercase') {
|
|
9763
|
-
transformedText = rawText.toLowerCase();
|
|
9764
|
-
} else if (parsed.value === 'uppercase') {
|
|
9765
|
-
transformedText = rawText.toUpperCase();
|
|
9704
|
+
if (parentSortable) {
|
|
9705
|
+
parentSortable.dirty = true;
|
|
9766
9706
|
}
|
|
9767
|
-
|
|
9768
|
-
object.parsedStyle.text = transformedText;
|
|
9769
9707
|
}
|
|
9770
|
-
|
|
9771
|
-
return parsed;
|
|
9772
9708
|
}
|
|
9773
9709
|
};
|
|
9774
9710
|
|
|
@@ -9985,7 +9921,7 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
9985
9921
|
dirtifyToRoot(target);
|
|
9986
9922
|
target.dispatchEvent(new MutationEvent(ElementEvent.ATTR_MODIFIED, target, _this2, _this2, 'clipPath', MutationEvent.MODIFICATION, _this2, _this2));
|
|
9987
9923
|
|
|
9988
|
-
if (target.isCustomElement) {
|
|
9924
|
+
if (target.isCustomElement && target.isConnected) {
|
|
9989
9925
|
if (target.attributeChangedCallback) {
|
|
9990
9926
|
target.attributeChangedCallback('clipPath', _this2, _this2);
|
|
9991
9927
|
}
|
|
@@ -9997,7 +9933,7 @@ var DisplayObject = /*#__PURE__*/function (_Element) {
|
|
|
9997
9933
|
renderable.dirty = true;
|
|
9998
9934
|
this.dispatchEvent(new MutationEvent(ElementEvent.ATTR_MODIFIED, this, oldValue, value, name, MutationEvent.MODIFICATION, oldParsedValue, this.parsedStyle[name]));
|
|
9999
9935
|
|
|
10000
|
-
if (this.isCustomElement) {
|
|
9936
|
+
if (this.isCustomElement && this.isConnected) {
|
|
10001
9937
|
if (this.attributeChangedCallback) {
|
|
10002
9938
|
this.attributeChangedCallback(name, oldValue, value);
|
|
10003
9939
|
}
|
|
@@ -12866,8 +12802,11 @@ var CustomElementRegistry = /*#__PURE__*/function () {
|
|
|
12866
12802
|
return CustomElementRegistry;
|
|
12867
12803
|
}();
|
|
12868
12804
|
|
|
12805
|
+
var GeometryUpdaterFactory = Syringe.defineToken('GeometryUpdaterFactory');
|
|
12806
|
+
var GeometryAABBUpdater = Syringe.defineToken('GeometryAABBUpdater');
|
|
12807
|
+
|
|
12869
12808
|
var _PROPERTY_HANDLERS;
|
|
12870
|
-
var PROPERTY_HANDLERS = (_PROPERTY_HANDLERS = {}, _PROPERTY_HANDLERS[PropertySyntax.COORDINATE] = CSSPropertyLocalPosition, _PROPERTY_HANDLERS[PropertySyntax.COLOR] = CSSPropertyColor, _PROPERTY_HANDLERS[PropertySyntax.PAINT] = CSSPropertyColor, _PROPERTY_HANDLERS[PropertySyntax.OPACITY_VALUE] = CSSPropertyOpacity, _PROPERTY_HANDLERS[PropertySyntax.LENGTH_PERCENTAGE] = CSSPropertyLengthOrPercentage, _PROPERTY_HANDLERS[PropertySyntax.LENGTH_PERCENTAGE_12] = CSSPropertyLengthOrPercentage12, _PROPERTY_HANDLERS[PropertySyntax.LENGTH_PERCENTAGE_14] = CSSPropertyLengthOrPercentage14, _PROPERTY_HANDLERS[PropertySyntax.SHADOW_BLUR] = CSSPropertyShadowBlur, _PROPERTY_HANDLERS[PropertySyntax.LIST_OF_POINTS] = CSSPropertyPoints, _PROPERTY_HANDLERS[PropertySyntax.PATH] = CSSPropertyPath, _PROPERTY_HANDLERS[PropertySyntax.FILTER] = CSSPropertyFilter, _PROPERTY_HANDLERS[PropertySyntax.Z_INDEX] = CSSPropertyZIndex, _PROPERTY_HANDLERS[PropertySyntax.OFFSET_PATH] = CSSPropertyOffsetPath, _PROPERTY_HANDLERS[PropertySyntax.OFFSET_DISTANCE] = CSSPropertyOffsetDistance, _PROPERTY_HANDLERS[PropertySyntax.CLIP_PATH] = CSSPropertyClipPath, _PROPERTY_HANDLERS[PropertySyntax.TRANSFORM] = CSSPropertyTransform, _PROPERTY_HANDLERS[PropertySyntax.TRANSFORM_ORIGIN] = CSSPropertyTransformOrigin, _PROPERTY_HANDLERS[PropertySyntax.TEXT] = CSSPropertyText, _PROPERTY_HANDLERS[PropertySyntax.TEXT_TRANSFORM] = CSSPropertyTextTransform, _PROPERTY_HANDLERS);
|
|
12809
|
+
var PROPERTY_HANDLERS = (_PROPERTY_HANDLERS = {}, _PROPERTY_HANDLERS[PropertySyntax.COORDINATE] = CSSPropertyLocalPosition, _PROPERTY_HANDLERS[PropertySyntax.ANGLE] = CSSPropertyAngle, _PROPERTY_HANDLERS[PropertySyntax.COLOR] = CSSPropertyColor, _PROPERTY_HANDLERS[PropertySyntax.PAINT] = CSSPropertyColor, _PROPERTY_HANDLERS[PropertySyntax.OPACITY_VALUE] = CSSPropertyOpacity, _PROPERTY_HANDLERS[PropertySyntax.LENGTH_PERCENTAGE] = CSSPropertyLengthOrPercentage, _PROPERTY_HANDLERS[PropertySyntax.LENGTH_PERCENTAGE_12] = CSSPropertyLengthOrPercentage12, _PROPERTY_HANDLERS[PropertySyntax.LENGTH_PERCENTAGE_14] = CSSPropertyLengthOrPercentage14, _PROPERTY_HANDLERS[PropertySyntax.SHADOW_BLUR] = CSSPropertyShadowBlur, _PROPERTY_HANDLERS[PropertySyntax.LIST_OF_POINTS] = CSSPropertyPoints, _PROPERTY_HANDLERS[PropertySyntax.PATH] = CSSPropertyPath, _PROPERTY_HANDLERS[PropertySyntax.FILTER] = CSSPropertyFilter, _PROPERTY_HANDLERS[PropertySyntax.Z_INDEX] = CSSPropertyZIndex, _PROPERTY_HANDLERS[PropertySyntax.OFFSET_PATH] = CSSPropertyOffsetPath, _PROPERTY_HANDLERS[PropertySyntax.OFFSET_DISTANCE] = CSSPropertyOffsetDistance, _PROPERTY_HANDLERS[PropertySyntax.CLIP_PATH] = CSSPropertyClipPath, _PROPERTY_HANDLERS[PropertySyntax.TRANSFORM] = CSSPropertyTransform, _PROPERTY_HANDLERS[PropertySyntax.TRANSFORM_ORIGIN] = CSSPropertyTransformOrigin, _PROPERTY_HANDLERS[PropertySyntax.TEXT] = CSSPropertyText, _PROPERTY_HANDLERS[PropertySyntax.TEXT_TRANSFORM] = CSSPropertyTextTransform, _PROPERTY_HANDLERS);
|
|
12871
12810
|
/**
|
|
12872
12811
|
* Blink used them in code generation(css_properties.json5)
|
|
12873
12812
|
*/
|
|
@@ -13183,14 +13122,17 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
13183
13122
|
name: 'text',
|
|
13184
13123
|
layoutDependent: true,
|
|
13185
13124
|
defaultValue: '',
|
|
13186
|
-
syntax: PropertySyntax.TEXT
|
|
13125
|
+
syntax: PropertySyntax.TEXT,
|
|
13126
|
+
parsePriority: 50
|
|
13187
13127
|
}, {
|
|
13188
13128
|
name: 'textTransform',
|
|
13189
13129
|
layoutDependent: true,
|
|
13190
13130
|
inherited: true,
|
|
13191
13131
|
keywords: ['capitalize', 'uppercase', 'lowercase', 'none'],
|
|
13192
13132
|
defaultValue: 'none',
|
|
13193
|
-
syntax: PropertySyntax.TEXT_TRANSFORM
|
|
13133
|
+
syntax: PropertySyntax.TEXT_TRANSFORM,
|
|
13134
|
+
parsePriority: 51 // it must get parsed after text
|
|
13135
|
+
|
|
13194
13136
|
}, {
|
|
13195
13137
|
name: 'font',
|
|
13196
13138
|
layoutDependent: true
|
|
@@ -15067,6 +15009,159 @@ function toFontString(attributes) {
|
|
|
15067
15009
|
return fontStyle + " " + fontVariant + " " + fontWeight + " " + fontSizeString + " " + fontFamilies.join(',');
|
|
15068
15010
|
}
|
|
15069
15011
|
|
|
15012
|
+
var SceneGraphSelectorFactory = Syringe.defineToken('SceneGraphSelectorFactory');
|
|
15013
|
+
var SceneGraphSelector = Syringe.defineToken('SceneGraphSelector', {
|
|
15014
|
+
multiple: false
|
|
15015
|
+
});
|
|
15016
|
+
var ATTRIBUTE_REGEXP = /\[\s*(.*)=(.*)\s*\]/;
|
|
15017
|
+
/**
|
|
15018
|
+
* support the following DOM API:
|
|
15019
|
+
* * getElementById
|
|
15020
|
+
* * getElementsByClassName
|
|
15021
|
+
* * getElementsByName
|
|
15022
|
+
* * getElementsByTag
|
|
15023
|
+
* * querySelector
|
|
15024
|
+
* * querySelectorAll
|
|
15025
|
+
*/
|
|
15026
|
+
|
|
15027
|
+
var DefaultSceneGraphSelector = /*#__PURE__*/function () {
|
|
15028
|
+
function DefaultSceneGraphSelector() {}
|
|
15029
|
+
|
|
15030
|
+
var _proto = DefaultSceneGraphSelector.prototype;
|
|
15031
|
+
|
|
15032
|
+
_proto.selectOne = function selectOne(query, root) {
|
|
15033
|
+
var _this = this;
|
|
15034
|
+
|
|
15035
|
+
if (query.startsWith('.')) {
|
|
15036
|
+
return root.find(function (node) {
|
|
15037
|
+
// return !node.shadow && node.id === query.substring(1);
|
|
15038
|
+
return node.className === _this.getIdOrClassname(query);
|
|
15039
|
+
});
|
|
15040
|
+
} else if (query.startsWith('#')) {
|
|
15041
|
+
// getElementById('id')
|
|
15042
|
+
return root.find(function (node) {
|
|
15043
|
+
// return !node.shadow && node.id === query.substring(1);
|
|
15044
|
+
return node.id === _this.getIdOrClassname(query);
|
|
15045
|
+
});
|
|
15046
|
+
} else if (query.startsWith('[')) {
|
|
15047
|
+
var _this$getAttribute = this.getAttribute(query),
|
|
15048
|
+
name = _this$getAttribute.name,
|
|
15049
|
+
value = _this$getAttribute.value;
|
|
15050
|
+
|
|
15051
|
+
if (name) {
|
|
15052
|
+
// getElementByName();
|
|
15053
|
+
return root.find(function (node) {
|
|
15054
|
+
return root !== node && (name === 'name' ? node.name === value : _this.attributeToString(node, name) === value);
|
|
15055
|
+
});
|
|
15056
|
+
} else {
|
|
15057
|
+
return null;
|
|
15058
|
+
}
|
|
15059
|
+
} else {
|
|
15060
|
+
// getElementsByTag('circle');
|
|
15061
|
+
return root.find(function (node) {
|
|
15062
|
+
return root !== node && node.nodeName === query;
|
|
15063
|
+
});
|
|
15064
|
+
}
|
|
15065
|
+
};
|
|
15066
|
+
|
|
15067
|
+
_proto.selectAll = function selectAll(query, root) {
|
|
15068
|
+
var _this2 = this;
|
|
15069
|
+
|
|
15070
|
+
// only support `[name="${name}"]` `.className` `#id`
|
|
15071
|
+
if (query.startsWith('.')) {
|
|
15072
|
+
// getElementsByClassName('className');
|
|
15073
|
+
// should not include itself
|
|
15074
|
+
return root.findAll(function (node) {
|
|
15075
|
+
return root !== node && node.className === _this2.getIdOrClassname(query);
|
|
15076
|
+
});
|
|
15077
|
+
} else if (query.startsWith('#')) {
|
|
15078
|
+
return root.findAll(function (node) {
|
|
15079
|
+
return root !== node && node.id === _this2.getIdOrClassname(query);
|
|
15080
|
+
});
|
|
15081
|
+
} else if (query.startsWith('[')) {
|
|
15082
|
+
var _this$getAttribute2 = this.getAttribute(query),
|
|
15083
|
+
name = _this$getAttribute2.name,
|
|
15084
|
+
value = _this$getAttribute2.value;
|
|
15085
|
+
|
|
15086
|
+
if (name) {
|
|
15087
|
+
// getElementsByName();
|
|
15088
|
+
return root.findAll(function (node) {
|
|
15089
|
+
return root !== node && (name === 'name' ? node.name === value : _this2.attributeToString(node, name) === value);
|
|
15090
|
+
});
|
|
15091
|
+
} else {
|
|
15092
|
+
return [];
|
|
15093
|
+
}
|
|
15094
|
+
} else {
|
|
15095
|
+
// getElementsByTag('circle');
|
|
15096
|
+
return root.findAll(function (node) {
|
|
15097
|
+
return root !== node && node.nodeName === query;
|
|
15098
|
+
});
|
|
15099
|
+
}
|
|
15100
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15101
|
+
;
|
|
15102
|
+
|
|
15103
|
+
_proto.is = function is(query, node) {
|
|
15104
|
+
// a simple `matches` implementation
|
|
15105
|
+
if (query.startsWith('.')) {
|
|
15106
|
+
return node.className === this.getIdOrClassname(query);
|
|
15107
|
+
} else if (query.startsWith('#')) {
|
|
15108
|
+
return node.id === this.getIdOrClassname(query);
|
|
15109
|
+
} else if (query.startsWith('[')) {
|
|
15110
|
+
var _this$getAttribute3 = this.getAttribute(query),
|
|
15111
|
+
name = _this$getAttribute3.name,
|
|
15112
|
+
value = _this$getAttribute3.value;
|
|
15113
|
+
|
|
15114
|
+
return name === 'name' ? node.name === value : this.attributeToString(node, name) === value;
|
|
15115
|
+
} else {
|
|
15116
|
+
return node.nodeName === query;
|
|
15117
|
+
}
|
|
15118
|
+
};
|
|
15119
|
+
|
|
15120
|
+
_proto.getIdOrClassname = function getIdOrClassname(query) {
|
|
15121
|
+
return query.substring(1);
|
|
15122
|
+
};
|
|
15123
|
+
|
|
15124
|
+
_proto.getAttribute = function getAttribute(query) {
|
|
15125
|
+
var matches = query.match(ATTRIBUTE_REGEXP);
|
|
15126
|
+
var name = '';
|
|
15127
|
+
var value = '';
|
|
15128
|
+
|
|
15129
|
+
if (matches && matches.length > 2) {
|
|
15130
|
+
name = matches[1].replace(/"/g, '');
|
|
15131
|
+
value = matches[2].replace(/"/g, '');
|
|
15132
|
+
}
|
|
15133
|
+
|
|
15134
|
+
return {
|
|
15135
|
+
name: name,
|
|
15136
|
+
value: value
|
|
15137
|
+
};
|
|
15138
|
+
};
|
|
15139
|
+
|
|
15140
|
+
_proto.attributeToString = function attributeToString(node, name) {
|
|
15141
|
+
if (!node.getAttribute) {
|
|
15142
|
+
return '';
|
|
15143
|
+
}
|
|
15144
|
+
|
|
15145
|
+
var value = node.getAttribute(name);
|
|
15146
|
+
|
|
15147
|
+
if (isNil(value)) {
|
|
15148
|
+
return '';
|
|
15149
|
+
}
|
|
15150
|
+
|
|
15151
|
+
if (value.toString) {
|
|
15152
|
+
return value.toString();
|
|
15153
|
+
}
|
|
15154
|
+
|
|
15155
|
+
return '';
|
|
15156
|
+
};
|
|
15157
|
+
|
|
15158
|
+
return DefaultSceneGraphSelector;
|
|
15159
|
+
}();
|
|
15160
|
+
|
|
15161
|
+
DefaultSceneGraphSelector = __decorate([singleton({
|
|
15162
|
+
token: SceneGraphSelector
|
|
15163
|
+
})], DefaultSceneGraphSelector);
|
|
15164
|
+
|
|
15070
15165
|
function sortByZIndex(o1, o2) {
|
|
15071
15166
|
var zIndex1 = Number(o1.style.zIndex);
|
|
15072
15167
|
var zIndex2 = Number(o2.style.zIndex);
|
|
@@ -19867,7 +19962,7 @@ var EventPlugin = EventPlugin_1 = (_class$4 = /*#__PURE__*/function () {
|
|
|
19867
19962
|
var _this$renderingContex, _this$renderingContex2;
|
|
19868
19963
|
|
|
19869
19964
|
var canvas = (_this$renderingContex = _this.renderingContext.root) === null || _this$renderingContex === void 0 ? void 0 : (_this$renderingContex2 = _this$renderingContex.ownerDocument) === null || _this$renderingContex2 === void 0 ? void 0 : _this$renderingContex2.defaultView;
|
|
19870
|
-
if (canvas.
|
|
19965
|
+
if (canvas.supportsTouchEvents && nativeEvent.pointerType === 'touch') return;
|
|
19871
19966
|
|
|
19872
19967
|
var normalizedEvents = _this.normalizeToPointerEvent(nativeEvent, canvas);
|
|
19873
19968
|
|
|
@@ -19928,6 +20023,8 @@ var EventPlugin = EventPlugin_1 = (_class$4 = /*#__PURE__*/function () {
|
|
|
19928
20023
|
_this2.eventService.mapEvent(wheelEvent);
|
|
19929
20024
|
});
|
|
19930
20025
|
renderingService.hooks.pointerDown.tap(EventPlugin_1.tag, function (nativeEvent) {
|
|
20026
|
+
if (canvas.supportsTouchEvents && nativeEvent.pointerType === 'touch') return;
|
|
20027
|
+
|
|
19931
20028
|
var events = _this2.normalizeToPointerEvent(nativeEvent, canvas);
|
|
19932
20029
|
|
|
19933
20030
|
if (_this2.autoPreventDefault && events[0].isNormalized) {
|
|
@@ -19949,7 +20046,7 @@ var EventPlugin = EventPlugin_1 = (_class$4 = /*#__PURE__*/function () {
|
|
|
19949
20046
|
_this2.setCursor(_this2.eventService.cursor);
|
|
19950
20047
|
});
|
|
19951
20048
|
renderingService.hooks.pointerUp.tap(EventPlugin_1.tag, function (nativeEvent) {
|
|
19952
|
-
if (canvas.
|
|
20049
|
+
if (canvas.supportsTouchEvents && nativeEvent.pointerType === 'touch') return; // account for element in SVG
|
|
19953
20050
|
|
|
19954
20051
|
var $element = _this2.contextService.getDomElement();
|
|
19955
20052
|
|
|
@@ -19973,24 +20070,7 @@ var EventPlugin = EventPlugin_1 = (_class$4 = /*#__PURE__*/function () {
|
|
|
19973
20070
|
});
|
|
19974
20071
|
renderingService.hooks.pointerMove.tap(EventPlugin_1.tag, this.onPointerMove);
|
|
19975
20072
|
renderingService.hooks.pointerOver.tap(EventPlugin_1.tag, this.onPointerMove);
|
|
19976
|
-
renderingService.hooks.pointerOut.tap(EventPlugin_1.tag, this.onPointerMove);
|
|
19977
|
-
// EventPlugin.tag,
|
|
19978
|
-
// (nativeEvent: InteractivePointerEvent) => {
|
|
19979
|
-
// if (canvas.supportTouchEvent && (nativeEvent as PointerEvent).pointerType === 'touch') {
|
|
19980
|
-
// return;
|
|
19981
|
-
// }
|
|
19982
|
-
// const normalizedEvent = this.normalizeToPointerEvent(nativeEvent, canvas);
|
|
19983
|
-
// if (this.autoPreventDefault && (normalizedEvent as any).isNormalized) {
|
|
19984
|
-
// const cancelable = nativeEvent.cancelable || !('cancelable' in nativeEvent);
|
|
19985
|
-
// if (cancelable) {
|
|
19986
|
-
// nativeEvent.preventDefault();
|
|
19987
|
-
// }
|
|
19988
|
-
// }
|
|
19989
|
-
// const federatedEvent = this.bootstrapEvent(this.rootPointerEvent, normalizedEvent, canvas);
|
|
19990
|
-
// this.eventService.mapEvent(federatedEvent);
|
|
19991
|
-
// this.setCursor(this.eventService.cursor);
|
|
19992
|
-
// },
|
|
19993
|
-
// );
|
|
20073
|
+
renderingService.hooks.pointerOut.tap(EventPlugin_1.tag, this.onPointerMove);
|
|
19994
20074
|
};
|
|
19995
20075
|
|
|
19996
20076
|
_proto.bootstrapEvent = function bootstrapEvent(e, nativeEvent, view) {
|
|
@@ -20271,8 +20351,8 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
|
|
|
20271
20351
|
_this.requestAnimationFrame = void 0;
|
|
20272
20352
|
_this.cancelAnimationFrame = void 0;
|
|
20273
20353
|
_this.devicePixelRatio = void 0;
|
|
20274
|
-
_this.
|
|
20275
|
-
_this.
|
|
20354
|
+
_this.supportsPointerEvents = void 0;
|
|
20355
|
+
_this.supportsTouchEvents = void 0;
|
|
20276
20356
|
_this.isTouchEvent = void 0;
|
|
20277
20357
|
_this.isMouseEvent = void 0;
|
|
20278
20358
|
_this.Element = DisplayObject;
|
|
@@ -20297,8 +20377,8 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
|
|
|
20297
20377
|
requestAnimationFrame = config.requestAnimationFrame,
|
|
20298
20378
|
cancelAnimationFrame = config.cancelAnimationFrame,
|
|
20299
20379
|
createImage = config.createImage,
|
|
20300
|
-
|
|
20301
|
-
|
|
20380
|
+
supportsPointerEvents = config.supportsPointerEvents,
|
|
20381
|
+
supportsTouchEvents = config.supportsTouchEvents,
|
|
20302
20382
|
isTouchEvent = config.isTouchEvent,
|
|
20303
20383
|
isMouseEvent = config.isMouseEvent;
|
|
20304
20384
|
cleanExistedCanvas(container, _assertThisInitialized(_this));
|
|
@@ -20327,13 +20407,13 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
|
|
|
20327
20407
|
// the following feature-detect from hammer.js
|
|
20328
20408
|
// @see https://github.com/hammerjs/hammer.js/blob/master/src/inputjs/input-consts.js#L5
|
|
20329
20409
|
|
|
20330
|
-
_this.
|
|
20331
|
-
_this.
|
|
20410
|
+
_this.supportsTouchEvents = supportsTouchEvents !== null && supportsTouchEvents !== void 0 ? supportsTouchEvents : 'ontouchstart' in globalThis;
|
|
20411
|
+
_this.supportsPointerEvents = supportsPointerEvents !== null && supportsPointerEvents !== void 0 ? supportsPointerEvents : !!globalThis.PointerEvent;
|
|
20332
20412
|
_this.isTouchEvent = isTouchEvent !== null && isTouchEvent !== void 0 ? isTouchEvent : function (event) {
|
|
20333
|
-
return _this.
|
|
20413
|
+
return _this.supportsTouchEvents && event instanceof globalThis.TouchEvent;
|
|
20334
20414
|
};
|
|
20335
20415
|
_this.isMouseEvent = isMouseEvent !== null && isMouseEvent !== void 0 ? isMouseEvent : function (event) {
|
|
20336
|
-
return !globalThis.MouseEvent || event instanceof globalThis.MouseEvent && (!_this.
|
|
20416
|
+
return !globalThis.MouseEvent || event instanceof globalThis.MouseEvent && (!_this.supportsPointerEvents || !(event instanceof globalThis.PointerEvent));
|
|
20337
20417
|
};
|
|
20338
20418
|
|
|
20339
20419
|
_this.initRenderingContext({
|
|
@@ -20638,9 +20718,9 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
|
|
|
20638
20718
|
var oldRenderer = canvasConfig.renderer;
|
|
20639
20719
|
canvasConfig.renderer = renderer; // keep all children undestroyed
|
|
20640
20720
|
|
|
20641
|
-
this.destroy(false); // destroy all plugins
|
|
20721
|
+
this.destroy(false); // destroy all plugins, reverse will mutate origin array
|
|
20642
20722
|
|
|
20643
|
-
oldRenderer === null || oldRenderer === void 0 ? void 0 : oldRenderer.getPlugins().reverse().forEach(function (plugin) {
|
|
20723
|
+
[].concat(oldRenderer === null || oldRenderer === void 0 ? void 0 : oldRenderer.getPlugins()).reverse().forEach(function (plugin) {
|
|
20644
20724
|
plugin.destroy(_this6.container);
|
|
20645
20725
|
});
|
|
20646
20726
|
this.initRenderer(renderer);
|
|
@@ -20763,4 +20843,4 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
|
|
|
20763
20843
|
GlobalContainer.load(containerModule);
|
|
20764
20844
|
var layoutEngine = GlobalContainer.get(LayoutEngine);
|
|
20765
20845
|
|
|
20766
|
-
export { AABB, AbstractLayoutDefinition, AbstractRenderer, Animation, AnimationEffectTiming, AnimationEvent, AnimationTimeline, AsyncParallelHook, AsyncSeriesWaterfallHook, BUILT_IN_PROPERTIES, BaseType, BoundingSphere, CSS, CSSColorValue, CSSGradientValue, CSSKeywordValue, CSSMathInvert, CSSMathMax, CSSMathMin, CSSMathNegate, CSSMathOperator, CSSMathProduct, CSSMathSum, CSSMathValue, CSSMathVariadic, CSSNumericValue, CSSNumericValueType, CSSPropertyClipPath, CSSPropertyColor, CSSPropertyFilter, CSSPropertyLengthOrPercentage, CSSPropertyLengthOrPercentage12, CSSPropertyLengthOrPercentage14, CSSPropertyLocalPosition, CSSPropertyOffsetDistance, CSSPropertyOffsetPath, CSSPropertyOpacity, CSSPropertyPath, CSSPropertyPoints, CSSPropertyShadowBlur, CSSPropertyText, CSSPropertyTextTransform, CSSPropertyTransform, CSSPropertyTransformOrigin, CSSPropertyZIndex, CSSRGB, CSSStyleValue, CSSStyleValueType, CSSUnitValue, Camera, CameraEvent, CameraProjectionMode, CameraTrackingMode, CameraType, Canvas, CanvasConfig, CanvasEvent, Circle, CircleUpdater, ContextNode, ContextService, Cullable, CustomElement, CustomElementRegistry, CustomEvent, DCHECK, DCHECK_EQ, DCHECK_NE, DELEGATION_SPLITTER, DefaultCamera, DefaultSceneGraphSelector, DefaultSceneGraphService, DefaultStyleValueRegistry, Deferred, DisplayObject, DisplayObjectPool, Document, EasingFunctions, Element, ElementEvent, Ellipse, EllipseUpdater, EventService, EventTarget, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FragmentResult, FragmentResultFactory, FragmentResultOptions, Frustum, Geometry, GeometryAABBUpdater, GeometryUpdaterFactory, GradientPatternType, Group, HTML, Image, KeyframeEffect, LayoutChildren, LayoutChildrenFactory, LayoutChildrenOptions, LayoutContext, LayoutContextFactory, LayoutContextOptions, LayoutEdges, LayoutEdgesFactory, LayoutEdgesOptions, LayoutEngine, LayoutFragment, LayoutFragmentFactory, LayoutFragmentOptions, LayoutObject, LayoutRegistry, LayoutTaskType, Line, LineUpdater, MOUSE_POINTER_ID, Mask, MutationEvent, MutationObserver, MutationRecord, Nested, Node, ObjectTyped, Odeg, OffscreenCanvasCreator, Opx, PROPERTY_HANDLERS, ParenLess, Path, PathUpdater, Plane, Point, Polygon, Polyline, PolylineUpdater, PropertyName, PropertySyntax, Ray, Rect, RectUpdater, Rectangle, Registration, RenderReason, Renderable, RenderingContext, RenderingPluginContribution, RenderingService, SceneGraphSelector, SceneGraphSelectorFactory, SceneGraphService, Shape, Sortable, Strategy, StyleValueRegistry, SyncHook, SyncWaterfallHook, TOUCH_TO_POINTER, Text, TextService, TextUpdater, Transform, UnitCategory, UnitType, ValueRange, baseTypeToString, camelCase, clamp, clampedMergeNumbers, cleanExistedCanvas, clonePath, compareAnimations, convertAngleUnit, convertEffectInput, convertPercentUnit, convertToDash, convertToPath, createVec3, decompose, deg2rad, deg2turn, dirtifyToRoot, equalSet, equalizeSegments, formatAttribute, fromRotationTranslationScale, getAngle, getDrawDirection, getEasingFunction, getEuler, getPathArea, getRotatedCurve, getRotationInRadians, getScaling, getTranslation, grad2deg, isBoolean, isBrowser, isComparison, isFunction, isNil, isNumber, isObject, isString, isUndefined, layoutEngine, makePerspective, makeQuerablePromise, makeTiming, mergeColors, mergeDimensionList, mergeDimensions, mergeNumberLists, mergeNumbers, mergePaths, mergeTransforms, normalizeKeyframes, normalizeTimingInput, numberToString, numericTimingToObject, parseAngle, parseColor, parseDimension, parseDimensionArray, parseFilter, parseLength, parseLengthOrPercentage, parseNumber, parseNumberList, parseParam, parsePath, parsePoints, parseTransform, parseTransformOrigin, parserPercentage, rad2deg, reverseCurve, setDOMSize, sortByZIndex, toFontString, turn2deg, typeCheck, unitTypeToBaseType };
|
|
20846
|
+
export { AABB, AbstractLayoutDefinition, AbstractRenderer, Animation, AnimationEffectTiming, AnimationEvent, AnimationTimeline, AsyncParallelHook, AsyncSeriesWaterfallHook, BUILT_IN_PROPERTIES, BaseType, BoundingSphere, CSS, CSSColorValue, CSSGradientValue, CSSKeywordValue, CSSMathInvert, CSSMathMax, CSSMathMin, CSSMathNegate, CSSMathOperator, CSSMathProduct, CSSMathSum, CSSMathValue, CSSMathVariadic, CSSNumericValue, CSSNumericValueType, CSSPropertyAngle, CSSPropertyClipPath, CSSPropertyColor, CSSPropertyFilter, CSSPropertyLengthOrPercentage, CSSPropertyLengthOrPercentage12, CSSPropertyLengthOrPercentage14, CSSPropertyLocalPosition, CSSPropertyOffsetDistance, CSSPropertyOffsetPath, CSSPropertyOpacity, CSSPropertyPath, CSSPropertyPoints, CSSPropertyShadowBlur, CSSPropertyText, CSSPropertyTextTransform, CSSPropertyTransform, CSSPropertyTransformOrigin, CSSPropertyZIndex, CSSRGB, CSSStyleValue, CSSStyleValueType, CSSUnitValue, Camera, CameraEvent, CameraProjectionMode, CameraTrackingMode, CameraType, Canvas, CanvasConfig, CanvasEvent, Circle, CircleUpdater, ContextNode, ContextService, Cullable, CustomElement, CustomElementRegistry, CustomEvent, DCHECK, DCHECK_EQ, DCHECK_NE, DELEGATION_SPLITTER, DefaultCamera, DefaultSceneGraphSelector, DefaultSceneGraphService, DefaultStyleValueRegistry, Deferred, DisplayObject, DisplayObjectPool, Document, EasingFunctions, Element, ElementEvent, Ellipse, EllipseUpdater, EventService, EventTarget, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FragmentResult, FragmentResultFactory, FragmentResultOptions, Frustum, Geometry, GeometryAABBUpdater, GeometryUpdaterFactory, GradientPatternType, Group, HTML, Image, KeyframeEffect, LayoutChildren, LayoutChildrenFactory, LayoutChildrenOptions, LayoutContext, LayoutContextFactory, LayoutContextOptions, LayoutEdges, LayoutEdgesFactory, LayoutEdgesOptions, LayoutEngine, LayoutFragment, LayoutFragmentFactory, LayoutFragmentOptions, LayoutObject, LayoutRegistry, LayoutTaskType, Line, LineUpdater, MOUSE_POINTER_ID, Mask, MutationEvent, MutationObserver, MutationRecord, Nested, Node, ObjectTyped, Odeg, OffscreenCanvasCreator, Opx, PROPERTY_HANDLERS, ParenLess, Path, PathUpdater, Plane, Point, Polygon, Polyline, PolylineUpdater, PropertyName, PropertySyntax, Ray, Rect, RectUpdater, Rectangle, Registration, RenderReason, Renderable, RenderingContext, RenderingPluginContribution, RenderingService, SceneGraphSelector, SceneGraphSelectorFactory, SceneGraphService, Shape, Sortable, Strategy, StyleValueRegistry, SyncHook, SyncWaterfallHook, TOUCH_TO_POINTER, Text, TextService, TextUpdater, Transform, UnitCategory, UnitType, ValueRange, baseTypeToString, camelCase, clamp, clampedMergeNumbers, cleanExistedCanvas, clonePath, compareAnimations, convertAngleUnit, convertEffectInput, convertPercentUnit, convertToDash, convertToPath, createVec3, decompose, deg2rad, deg2turn, dirtifyToRoot, equalSet, equalizeSegments, formatAttribute, fromRotationTranslationScale, getAngle, getDrawDirection, getEasingFunction, getEuler, getPathArea, getRotatedCurve, getRotationInRadians, getScaling, getTranslation, grad2deg, isBoolean, isBrowser, isComparison, isFunction, isNil, isNumber, isObject, isString, isUndefined, layoutEngine, makePerspective, makeQuerablePromise, makeTiming, mergeColors, mergeDimensionList, mergeDimensions, mergeNumberLists, mergeNumbers, mergePaths, mergeTransforms, normalizeKeyframes, normalizeTimingInput, numberToString, numericTimingToObject, parseAngle, parseColor, parseDimension, parseDimensionArray, parseFilter, parseLength, parseLengthOrPercentage, parseNumber, parseNumberList, parseParam, parsePath, parsePoints, parseTransform, parseTransformOrigin, parserPercentage, rad2deg, reverseCurve, setDOMSize, sortByZIndex, toFontString, turn2deg, typeCheck, unitTypeToBaseType };
|