@antv/g 5.6.0 → 5.6.3

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/index.js CHANGED
@@ -9053,6 +9053,10 @@ function mergeTransforms(left, right, target) {
9053
9053
 
9054
9054
  function parseTransformOrigin(value) {
9055
9055
  if (isString(value)) {
9056
+ if (value === 'text-anchor') {
9057
+ return [new CSSUnitValue(0, 'px'), new CSSUnitValue(0, 'px')];
9058
+ }
9059
+
9056
9060
  var values = value.split(' ');
9057
9061
 
9058
9062
  if (values.length === 1) {
@@ -10606,7 +10610,8 @@ var DEFAULT_STYLE_PROPS = {
10606
10610
  textBaseline: '',
10607
10611
  textTransform: '',
10608
10612
  zIndex: '',
10609
- filter: ''
10613
+ filter: '',
10614
+ shadowType: ''
10610
10615
  };
10611
10616
  /**
10612
10617
  * prototype chains: DisplayObject -> Element -> Node -> EventTarget
@@ -11696,7 +11701,7 @@ var Path = /*#__PURE__*/function (_DisplayObject) {
11696
11701
  type: exports.Shape.PATH,
11697
11702
  style: _extends({
11698
11703
  path: '',
11699
- miterLimit: 4
11704
+ miterLimit: ''
11700
11705
  }, style)
11701
11706
  }, rest)) || this;
11702
11707
  }
@@ -11797,7 +11802,7 @@ var Polygon = /*#__PURE__*/function (_DisplayObject) {
11797
11802
  type: exports.Shape.POLYGON,
11798
11803
  style: _extends({
11799
11804
  points: '',
11800
- miterLimit: 4
11805
+ miterLimit: ''
11801
11806
  }, style)
11802
11807
  }, rest)) || this;
11803
11808
  }
@@ -11818,7 +11823,7 @@ var Polyline = /*#__PURE__*/function (_DisplayObject) {
11818
11823
  type: exports.Shape.POLYLINE,
11819
11824
  style: _extends({
11820
11825
  points: '',
11821
- miterLimit: 4
11826
+ miterLimit: ''
11822
11827
  }, style)
11823
11828
  }, rest)) || this;
11824
11829
  }
@@ -11909,14 +11914,15 @@ var Text = /*#__PURE__*/function (_DisplayObject) {
11909
11914
  /**
11910
11915
  * @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement#constants
11911
11916
  */
11917
+ // LENGTHADJUST_SPACING: number = 1;
11918
+ // LENGTHADJUST_SPACINGANDGLYPHS: number = 2;
11919
+ // LENGTHADJUST_UNKNOWN: number = 0;
11912
11920
  function Text(_temp) {
11913
- var _this;
11914
-
11915
11921
  var _ref = _temp === void 0 ? {} : _temp,
11916
11922
  style = _ref.style,
11917
11923
  rest = _objectWithoutPropertiesLoose(_ref, _excluded$a);
11918
11924
 
11919
- _this = _DisplayObject.call(this, _extends({
11925
+ return _DisplayObject.call(this, _extends({
11920
11926
  type: exports.Shape.TEXT,
11921
11927
  style: _extends({
11922
11928
  x: '',
@@ -11930,17 +11936,10 @@ var Text = /*#__PURE__*/function (_DisplayObject) {
11930
11936
  textAlign: '',
11931
11937
  textBaseline: '',
11932
11938
  textTransform: '',
11933
- // dropShadow: false,
11934
- // dropShadowAlpha: 1,
11935
- // dropShadowAngle: Math.PI / 6,
11936
- // dropShadowBlur: 0,
11937
- // dropShadowColor: '#000',
11938
- // dropShadowDistance: 5,
11939
11939
  fill: 'black',
11940
- // stroke: 'black',
11941
- letterSpacing: 0,
11942
- lineHeight: 0,
11943
- miterLimit: 10,
11940
+ letterSpacing: '',
11941
+ lineHeight: '',
11942
+ miterLimit: '',
11944
11943
  whiteSpace: 'pre',
11945
11944
  wordWrap: false,
11946
11945
  wordWrapWidth: 0,
@@ -11949,57 +11948,45 @@ var Text = /*#__PURE__*/function (_DisplayObject) {
11949
11948
  dy: ''
11950
11949
  }, style)
11951
11950
  }, rest)) || this;
11952
- _this.LENGTHADJUST_SPACING = 1;
11953
- _this.LENGTHADJUST_SPACINGANDGLYPHS = 2;
11954
- _this.LENGTHADJUST_UNKNOWN = 0;
11955
- _this.lengthAdjust = void 0;
11956
- _this.textLength = void 0;
11957
- return _this;
11958
- }
11959
-
11960
- var _proto = Text.prototype;
11951
+ } // lengthAdjust: SVGAnimatedEnumeration;
11952
+ // textLength: SVGAnimatedLength;
11953
+ // getCharNumAtPosition(point?: DOMPointInit): number {
11954
+ // throw new Error('Method not implemented.');
11955
+ // }
11961
11956
 
11962
- _proto.getCharNumAtPosition = function getCharNumAtPosition(point) {
11963
- throw new Error('Method not implemented.');
11964
- }
11965
11957
  /**
11966
11958
  * @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement
11967
11959
  */
11968
- ;
11960
+
11961
+
11962
+ var _proto = Text.prototype;
11969
11963
 
11970
11964
  _proto.getComputedTextLength = function getComputedTextLength() {
11971
11965
  var _this$parsedStyle$met;
11972
11966
 
11973
11967
  return ((_this$parsedStyle$met = this.parsedStyle.metrics) === null || _this$parsedStyle$met === void 0 ? void 0 : _this$parsedStyle$met.maxLineWidth) || 0;
11974
- };
11975
-
11976
- _proto.getEndPositionOfChar = function getEndPositionOfChar(charnum) {
11977
- throw new Error('Method not implemented.');
11978
- };
11979
-
11980
- _proto.getExtentOfChar = function getExtentOfChar(charnum) {
11981
- throw new Error('Method not implemented.');
11982
- };
11983
-
11984
- _proto.getNumberOfChars = function getNumberOfChars() {
11985
- throw new Error('Method not implemented.');
11986
- };
11987
-
11988
- _proto.getRotationOfChar = function getRotationOfChar(charnum) {
11989
- throw new Error('Method not implemented.');
11990
- };
11991
-
11992
- _proto.getStartPositionOfChar = function getStartPositionOfChar(charnum) {
11993
- throw new Error('Method not implemented.');
11994
- };
11995
-
11996
- _proto.getSubStringLength = function getSubStringLength(charnum, nchars) {
11997
- throw new Error('Method not implemented.');
11998
- };
11999
-
12000
- _proto.selectSubString = function selectSubString(charnum, nchars) {
12001
- throw new Error('Method not implemented.');
12002
- };
11968
+ } // getEndPositionOfChar(charnum: number): DOMPoint {
11969
+ // throw new Error('Method not implemented.');
11970
+ // }
11971
+ // getExtentOfChar(charnum: number): DOMRect {
11972
+ // throw new Error('Method not implemented.');
11973
+ // }
11974
+ // getNumberOfChars(): number {
11975
+ // throw new Error('Method not implemented.');
11976
+ // }
11977
+ // getRotationOfChar(charnum: number): number {
11978
+ // throw new Error('Method not implemented.');
11979
+ // }
11980
+ // getStartPositionOfChar(charnum: number): DOMPoint {
11981
+ // throw new Error('Method not implemented.');
11982
+ // }
11983
+ // getSubStringLength(charnum: number, nchars: number): number {
11984
+ // throw new Error('Method not implemented.');
11985
+ // }
11986
+ // selectSubString(charnum: number, nchars: number): void {
11987
+ // throw new Error('Method not implemented.');
11988
+ // }
11989
+ ;
12003
11990
 
12004
11991
  _proto.getLineBoundingRects = function getLineBoundingRects() {
12005
11992
  var _this$parsedStyle$met2;
@@ -12941,7 +12928,9 @@ var Document = /*#__PURE__*/function (_Node) {
12941
12928
  clazz = tagName === 'tspan' ? Text : Group;
12942
12929
  }
12943
12930
 
12944
- return new clazz(options);
12931
+ var shape = new clazz(options);
12932
+ shape.ownerDocument = this;
12933
+ return shape;
12945
12934
  };
12946
12935
 
12947
12936
  _proto.createElementNS = function createElementNS(namespaceURI, tagName, options) {
@@ -13248,6 +13237,16 @@ var FederatedMouseEvent = /*#__PURE__*/function (_FederatedEvent) {
13248
13237
  get: function get() {
13249
13238
  return this.client.y;
13250
13239
  }
13240
+ }, {
13241
+ key: "x",
13242
+ get: function get() {
13243
+ return this.clientX;
13244
+ }
13245
+ }, {
13246
+ key: "y",
13247
+ get: function get() {
13248
+ return this.clientY;
13249
+ }
13251
13250
  /**
13252
13251
  * The movement in this pointer relative to the last `mousemove` event.
13253
13252
  */
@@ -16591,20 +16590,15 @@ exports.RenderingService = /*#__PURE__*/function () {
16591
16590
 
16592
16591
  if (this.renderingContext.renderReasons.size && this.inited) {
16593
16592
  this.renderDisplayObject(this.renderingContext.root, canvasConfig);
16593
+ this.hooks.beginFrame.call();
16594
+ this.renderingContext.renderListCurrentFrame.forEach(function (object) {
16595
+ _this2.hooks.beforeRender.call(object);
16594
16596
 
16595
- if (this.renderingContext.renderListCurrentFrame.length || this.renderingContext.renderListLastFrame.length !== this.renderingContext.renderListCurrentFrame.length) {
16596
- this.hooks.beginFrame.call();
16597
- this.renderingContext.renderListCurrentFrame.forEach(function (object) {
16598
- _this2.hooks.beforeRender.call(object);
16599
-
16600
- _this2.hooks.render.call(object);
16597
+ _this2.hooks.render.call(object);
16601
16598
 
16602
- _this2.hooks.afterRender.call(object);
16603
- });
16604
- this.hooks.endFrame.call();
16605
- }
16606
-
16607
- this.renderingContext.renderListLastFrame = [].concat(this.renderingContext.renderListCurrentFrame);
16599
+ _this2.hooks.afterRender.call(object);
16600
+ });
16601
+ this.hooks.endFrame.call();
16608
16602
  this.renderingContext.renderListCurrentFrame = [];
16609
16603
  this.renderingContext.renderReasons.clear();
16610
16604
  } // console.log('stats', this.stats);
@@ -16765,7 +16759,7 @@ exports.EventService = /*#__PURE__*/function (_EventEmitter) {
16765
16759
 
16766
16760
  _this.onPointerUp = /*#__PURE__*/function () {
16767
16761
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(from) {
16768
- var now, e, isRightButton, trackingData, pressTarget, clickTarget, currentTarget, _isRightButton, clickEvent, clickHistory;
16762
+ var now, e, isRightButton, trackingData, pressTarget, clickTarget, currentTarget, _isRightButton, _e$detail, clickEvent, clickHistory;
16769
16763
 
16770
16764
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
16771
16765
  while (1) {
@@ -16851,12 +16845,14 @@ exports.EventService = /*#__PURE__*/function (_EventEmitter) {
16851
16845
 
16852
16846
  clickHistory.target = clickEvent.target;
16853
16847
  clickHistory.timeStamp = now;
16854
- clickEvent.detail = clickHistory.clickCount;
16848
+ clickEvent.detail = clickHistory.clickCount; // @see https://github.com/antvis/G/issues/1091
16855
16849
 
16856
- if (clickEvent.pointerType === 'mouse' || clickEvent.pointerType === 'touch') {
16857
- _this.dispatchEvent(clickEvent, 'click');
16858
- } else {
16859
- _this.dispatchEvent(clickEvent, 'pointertap');
16850
+ if (!((_e$detail = e.detail) === null || _e$detail === void 0 ? void 0 : _e$detail.preventClick)) {
16851
+ if (clickEvent.pointerType === 'mouse' || clickEvent.pointerType === 'touch') {
16852
+ _this.dispatchEvent(clickEvent, 'click');
16853
+ } else {
16854
+ _this.dispatchEvent(clickEvent, 'pointertap');
16855
+ }
16860
16856
  }
16861
16857
 
16862
16858
  _this.freeEvent(clickEvent);
@@ -18100,13 +18096,11 @@ exports.TextService = /*#__PURE__*/function () {
18100
18096
  _proto.measureText = function measureText(text, parsedStyle, offscreenCanvas) {
18101
18097
  var fontSize = parsedStyle.fontSize,
18102
18098
  wordWrap = parsedStyle.wordWrap,
18103
- _parsedStyle$lineHeig = parsedStyle.lineHeight,
18104
- strokeHeight = _parsedStyle$lineHeig === void 0 ? 0 : _parsedStyle$lineHeig,
18099
+ strokeHeight = parsedStyle.lineHeight,
18105
18100
  lineWidth = parsedStyle.lineWidth,
18106
18101
  textBaseline = parsedStyle.textBaseline,
18107
18102
  textAlign = parsedStyle.textAlign,
18108
- _parsedStyle$letterSp = parsedStyle.letterSpacing,
18109
- letterSpacing = _parsedStyle$letterSp === void 0 ? 0 : _parsedStyle$letterSp,
18103
+ letterSpacing = parsedStyle.letterSpacing,
18110
18104
  _parsedStyle$leading = parsedStyle.leading,
18111
18105
  leading = _parsedStyle$leading === void 0 ? 0 : _parsedStyle$leading;
18112
18106
  var font = toFontString(parsedStyle);
@@ -18126,7 +18120,7 @@ exports.TextService = /*#__PURE__*/function () {
18126
18120
  var maxLineWidth = 0;
18127
18121
 
18128
18122
  for (var i = 0; i < lines.length; i++) {
18129
- var _lineWidth = context.measureText(lines[i]).width + (lines[i].length - 1) * letterSpacing;
18123
+ var _lineWidth = context.measureText(lines[i]).width + (lines[i].length - 1) * letterSpacing.value;
18130
18124
 
18131
18125
  lineWidths[i] = _lineWidth;
18132
18126
  maxLineWidth = Math.max(maxLineWidth, _lineWidth);
@@ -18136,7 +18130,7 @@ exports.TextService = /*#__PURE__*/function () {
18136
18130
  // width += dropShadowDistance;
18137
18131
  // }
18138
18132
 
18139
- var lineHeight = strokeHeight || fontProperties.fontSize + lineWidth.value;
18133
+ var lineHeight = strokeHeight.value || fontProperties.fontSize + lineWidth.value;
18140
18134
  var height = Math.max(lineHeight, fontProperties.fontSize + lineWidth.value) + (lines.length - 1) * (lineHeight + leading); // if (dropShadow) {
18141
18135
  // height += dropShadowDistance;
18142
18136
  // }
@@ -18181,17 +18175,16 @@ exports.TextService = /*#__PURE__*/function () {
18181
18175
 
18182
18176
  var _ref$wordWrapWidth = _ref.wordWrapWidth,
18183
18177
  wordWrapWidth = _ref$wordWrapWidth === void 0 ? 0 : _ref$wordWrapWidth,
18184
- _ref$letterSpacing = _ref.letterSpacing,
18185
- letterSpacing = _ref$letterSpacing === void 0 ? 0 : _ref$letterSpacing;
18178
+ letterSpacing = _ref.letterSpacing;
18186
18179
  var context = this.offscreenCanvas.getOrCreateContext(offscreenCanvas);
18187
- var maxWidth = wordWrapWidth + letterSpacing;
18180
+ var maxWidth = wordWrapWidth + letterSpacing.value;
18188
18181
  var lines = [];
18189
18182
  var currentIndex = 0;
18190
18183
  var currentWidth = 0;
18191
18184
  var cache = {};
18192
18185
 
18193
18186
  var calcWidth = function calcWidth(char) {
18194
- return _this2.getFromCache(char, letterSpacing, cache, context);
18187
+ return _this2.getFromCache(char, letterSpacing.value, cache, context);
18195
18188
  };
18196
18189
 
18197
18190
  Array.from(text).forEach(function (char, i) {
@@ -18776,7 +18769,7 @@ function getFontSize(object) {
18776
18769
  return fontSize.clone();
18777
18770
  }
18778
18771
 
18779
- return new CSSUnitValue(0, 'px');
18772
+ return null;
18780
18773
  }
18781
18774
  /**
18782
18775
  * <length> & <percentage>
@@ -18804,8 +18797,13 @@ exports.CSSPropertyLengthOrPercentage = /*#__PURE__*/function () {
18804
18797
  } else if (computed.unit === exports.UnitType.kEms) {
18805
18798
  if (object.parentNode) {
18806
18799
  var fontSize = getFontSize(object.parentNode);
18807
- fontSize.value *= computed.value;
18808
- return fontSize;
18800
+
18801
+ if (fontSize) {
18802
+ fontSize.value *= computed.value;
18803
+ return fontSize;
18804
+ } else {
18805
+ registry.addUnresolveProperty(object, name);
18806
+ }
18809
18807
  }
18810
18808
 
18811
18809
  return new CSSUnitValue(0, 'px');
@@ -18815,8 +18813,12 @@ exports.CSSPropertyLengthOrPercentage = /*#__PURE__*/function () {
18815
18813
  if (object === null || object === void 0 ? void 0 : (_object$ownerDocument = object.ownerDocument) === null || _object$ownerDocument === void 0 ? void 0 : _object$ownerDocument.documentElement) {
18816
18814
  var _fontSize = getFontSize(object.ownerDocument.documentElement);
18817
18815
 
18818
- _fontSize.value *= computed.value;
18819
- return _fontSize;
18816
+ if (_fontSize) {
18817
+ _fontSize.value *= computed.value;
18818
+ return _fontSize;
18819
+ } else {
18820
+ registry.addUnresolveProperty(object, name);
18821
+ }
18820
18822
  }
18821
18823
 
18822
18824
  return new CSSUnitValue(0, 'px');
@@ -18975,7 +18977,11 @@ exports.CSSPropertyLocalPosition = /*#__PURE__*/function (_CSSPropertyLengthOrP)
18975
18977
  z = 0;
18976
18978
  break;
18977
18979
 
18978
- default:
18980
+ case exports.Shape.RECT:
18981
+ case exports.Shape.IMAGE:
18982
+ case exports.Shape.GROUP:
18983
+ case exports.Shape.HTML:
18984
+ case exports.Shape.TEXT:
18979
18985
  if (!isNil(object.parsedStyle.x)) {
18980
18986
  x = object.parsedStyle.x.value;
18981
18987
  }
@@ -18987,15 +18993,21 @@ exports.CSSPropertyLocalPosition = /*#__PURE__*/function (_CSSPropertyLengthOrP)
18987
18993
  break;
18988
18994
  }
18989
18995
 
18990
- object.parsedStyle.defX = x || 0;
18991
- object.parsedStyle.defY = y || 0;
18996
+ if (object.nodeName !== exports.Shape.PATH && object.nodeName !== exports.Shape.POLYLINE && object.nodeName !== exports.Shape.POLYGON) {
18997
+ object.parsedStyle.defX = x || 0;
18998
+ object.parsedStyle.defY = y || 0;
18999
+ }
19000
+
19001
+ var needResetLocalPosition = !isNil(x) || !isNil(y) || !isNil(z);
18992
19002
 
18993
- var _object$getLocalPosit = object.getLocalPosition(),
18994
- ox = _object$getLocalPosit[0],
18995
- oy = _object$getLocalPosit[1],
18996
- oz = _object$getLocalPosit[2];
19003
+ if (needResetLocalPosition) {
19004
+ var _object$getLocalPosit = object.getLocalPosition(),
19005
+ ox = _object$getLocalPosit[0],
19006
+ oy = _object$getLocalPosit[1],
19007
+ oz = _object$getLocalPosit[2];
18997
19008
 
18998
- object.setLocalPosition(isNil(x) ? ox : x, isNil(y) ? oy : y, isNil(z) ? oz : z);
19009
+ object.setLocalPosition(isNil(x) ? ox : x, isNil(y) ? oy : y, isNil(z) ? oz : z);
19010
+ }
18999
19011
  };
19000
19012
 
19001
19013
  return CSSPropertyLocalPosition;
@@ -19562,6 +19574,11 @@ var BUILT_IN_PROPERTIES = [{
19562
19574
  keywords: ['none'],
19563
19575
  defaultValue: 'none',
19564
19576
  syntax: exports.PropertySyntax.PAINT
19577
+ }, {
19578
+ name: 'shadowType',
19579
+ keywords: ['inner', 'outer', 'both'],
19580
+ defaultValue: 'outer',
19581
+ layoutDependent: true
19565
19582
  }, {
19566
19583
  name: 'shadowColor',
19567
19584
  interpolable: true,
@@ -19698,6 +19715,10 @@ var BUILT_IN_PROPERTIES = [{
19698
19715
  return 'center';
19699
19716
  }
19700
19717
 
19718
+ if (nodeName === exports.Shape.TEXT) {
19719
+ return 'text-anchor';
19720
+ }
19721
+
19701
19722
  return 'left top';
19702
19723
  },
19703
19724
  layoutDependent: true,
@@ -19828,12 +19849,14 @@ var BUILT_IN_PROPERTIES = [{
19828
19849
  layoutDependent: true,
19829
19850
  defaultValue: '',
19830
19851
  alias: ['d'],
19831
- syntax: exports.PropertySyntax.PATH
19852
+ syntax: exports.PropertySyntax.PATH,
19853
+ parsePriority: 50
19832
19854
  }, // Polyline & Polygon
19833
19855
  {
19834
19856
  name: 'points',
19835
19857
  layoutDependent: true,
19836
- syntax: exports.PropertySyntax.LIST_OF_POINTS
19858
+ syntax: exports.PropertySyntax.LIST_OF_POINTS,
19859
+ parsePriority: 50
19837
19860
  }, // Text
19838
19861
  {
19839
19862
  name: 'text',
@@ -19889,16 +19912,27 @@ var BUILT_IN_PROPERTIES = [{
19889
19912
  defaultValue: 'normal'
19890
19913
  }, {
19891
19914
  name: 'lineHeight',
19892
- layoutDependent: true // interpolable: true,
19893
- // inherited: true,
19894
- // defaultValue: '-100%'
19895
-
19915
+ layoutDependent: true,
19916
+ syntax: exports.PropertySyntax.LENGTH,
19917
+ interpolable: true,
19918
+ defaultValue: '0'
19896
19919
  }, {
19897
19920
  name: 'letterSpacing',
19898
- layoutDependent: true // interpolable: true,
19899
- // inherited: true,
19900
- // defaultValue: '0',
19921
+ layoutDependent: true,
19922
+ syntax: exports.PropertySyntax.LENGTH,
19923
+ interpolable: true,
19924
+ defaultValue: '0'
19925
+ }, {
19926
+ name: 'miterLimit',
19927
+ layoutDependent: true,
19928
+ syntax: exports.PropertySyntax.NUMBER,
19929
+ defaultValue: function defaultValue(nodeName) {
19930
+ if (nodeName === exports.Shape.PATH || nodeName === exports.Shape.POLYGON || nodeName === exports.Shape.POLYLINE) {
19931
+ return '4';
19932
+ }
19901
19933
 
19934
+ return '10';
19935
+ }
19902
19936
  }, {
19903
19937
  name: 'wordWrap',
19904
19938
  layoutDependent: true
@@ -20294,6 +20328,7 @@ exports.DefaultStyleValueRegistry = /*#__PURE__*/function () {
20294
20328
  var stroke = parsedStyle.stroke,
20295
20329
  lineWidth = parsedStyle.lineWidth,
20296
20330
  increasedLineWidthForHitTesting = parsedStyle.increasedLineWidthForHitTesting,
20331
+ shadowType = parsedStyle.shadowType,
20297
20332
  shadowColor = parsedStyle.shadowColor,
20298
20333
  _parsedStyle$filter = parsedStyle.filter,
20299
20334
  filter = _parsedStyle$filter === void 0 ? [] : _parsedStyle$filter,
@@ -20325,7 +20360,7 @@ exports.DefaultStyleValueRegistry = /*#__PURE__*/function () {
20325
20360
 
20326
20361
  geometry.renderBounds.update(center, halfExtents); // account for shadow, only support constant value now
20327
20362
 
20328
- if (shadowColor) {
20363
+ if (shadowColor && (shadowType === null || shadowType === void 0 ? void 0 : shadowType.value) !== 'inner') {
20329
20364
  var _geometry$renderBound = geometry.renderBounds,
20330
20365
  min = _geometry$renderBound.min,
20331
20366
  max = _geometry$renderBound.max;
@@ -20688,9 +20723,8 @@ var CullingPlugin = CullingPlugin_1 = (_class$1 = /*#__PURE__*/function () {
20688
20723
  if (!cullable.isCulled() && object.isVisible()) {
20689
20724
  return object;
20690
20725
  } else {
20691
- if (_this.renderingContext.renderListLastFrame.indexOf(object) > -1) {
20692
- object.dispatchEvent(new CustomEvent(exports.ElementEvent.CULLED));
20693
- }
20726
+ // if (this.renderingContext.renderListLastFrame.indexOf(object) > -1) {
20727
+ object.dispatchEvent(new CustomEvent(exports.ElementEvent.CULLED)); // }
20694
20728
  }
20695
20729
 
20696
20730
  return null;
@@ -20887,9 +20921,7 @@ var EventPlugin = EventPlugin_1 = (_class$3 = /*#__PURE__*/function () {
20887
20921
  renderingService.hooks.pointerOut.tap(EventPlugin_1.tag, this.onPointerMove);
20888
20922
  };
20889
20923
 
20890
- _proto.bootstrapEvent = function bootstrapEvent(e, nativeEvent, view) {
20891
- e.pointerType = nativeEvent.pointerType;
20892
- var event = e;
20924
+ _proto.bootstrapEvent = function bootstrapEvent(event, nativeEvent, view) {
20893
20925
  event.view = view;
20894
20926
  event.originalEvent = null;
20895
20927
  event.nativeEvent = nativeEvent;
@@ -20897,6 +20929,7 @@ var EventPlugin = EventPlugin_1 = (_class$3 = /*#__PURE__*/function () {
20897
20929
  event.width = nativeEvent.width;
20898
20930
  event.height = nativeEvent.height;
20899
20931
  event.isPrimary = nativeEvent.isPrimary;
20932
+ event.pointerType = nativeEvent.pointerType;
20900
20933
  event.pressure = nativeEvent.pressure;
20901
20934
  event.tangentialPressure = nativeEvent.tangentialPressure;
20902
20935
  event.tiltX = nativeEvent.tiltX;
@@ -20970,6 +21003,7 @@ var EventPlugin = EventPlugin_1 = (_class$3 = /*#__PURE__*/function () {
20970
21003
 
20971
21004
  _proto.transferMouseData = function transferMouseData(event, nativeEvent) {
20972
21005
  event.isTrusted = nativeEvent.isTrusted;
21006
+ event.srcElement = nativeEvent.srcElement;
20973
21007
  event.timeStamp = performance.now();
20974
21008
  event.type = nativeEvent.type;
20975
21009
  event.altKey = nativeEvent.altKey;
@@ -21001,8 +21035,8 @@ var EventPlugin = EventPlugin_1 = (_class$3 = /*#__PURE__*/function () {
21001
21035
  var touch = event.changedTouches[i]; // use changedTouches instead of touches since touchend has no touches
21002
21036
  // @see https://stackoverflow.com/a/10079076
21003
21037
 
21004
- if (isUndefined(touch.button)) touch.button = event.touches.length ? 1 : 0;
21005
- if (isUndefined(touch.buttons)) touch.buttons = event.touches.length ? 1 : 0;
21038
+ if (isUndefined(touch.button)) touch.button = 0;
21039
+ if (isUndefined(touch.buttons)) touch.buttons = 1;
21006
21040
 
21007
21041
  if (isUndefined(touch.isPrimary)) {
21008
21042
  touch.isPrimary = event.touches.length === 1 && event.type === 'touchstart';
@@ -21461,6 +21495,7 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
21461
21495
  devicePixelRatio = config.devicePixelRatio,
21462
21496
  renderer = config.renderer,
21463
21497
  background = config.background,
21498
+ cursor = config.cursor,
21464
21499
  document = config.document,
21465
21500
  requestAnimationFrame = config.requestAnimationFrame,
21466
21501
  cancelAnimationFrame = config.cancelAnimationFrame,
@@ -21512,7 +21547,7 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
21512
21547
  renderer: renderer,
21513
21548
  offscreenCanvas: offscreenCanvas,
21514
21549
  devicePixelRatio: dpr,
21515
- cursor: 'default',
21550
+ cursor: cursor || 'default',
21516
21551
  background: background,
21517
21552
  createImage: createImage,
21518
21553
  document: document
@@ -21563,7 +21598,6 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
21563
21598
  * the root node in scene graph
21564
21599
  */
21565
21600
  root: this.document.documentElement,
21566
- renderListLastFrame: [],
21567
21601
  renderListCurrentFrame: [],
21568
21602
  unculledEntities: [],
21569
21603
  renderReasons: new Set(),
@@ -21894,6 +21928,8 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
21894
21928
  }();
21895
21929
 
21896
21930
  _proto.setCursor = function setCursor(cursor) {
21931
+ var canvasConfig = this.container.get(CanvasConfig);
21932
+ canvasConfig.cursor = cursor;
21897
21933
  this.getContextService().applyCursorStyle(cursor);
21898
21934
  };
21899
21935
 
@@ -22013,7 +22049,6 @@ var Canvas = /*#__PURE__*/function (_EventTarget) {
22013
22049
  return Canvas;
22014
22050
  }(EventTarget);
22015
22051
 
22016
- // import * as ManaSyringe from 'mana-syringe';
22017
22052
  manaSyringe.GlobalContainer.load(containerModule);
22018
22053
  var layoutEngine = manaSyringe.GlobalContainer.get(exports.LayoutEngine);
22019
22054