@nasser-sw/fabric 7.0.1-beta3 → 7.0.1-beta5

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.
Files changed (105) hide show
  1. package/0 +0 -0
  2. package/dist/index.js +345 -162
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist/index.min.mjs +1 -1
  7. package/dist/index.min.mjs.map +1 -1
  8. package/dist/index.mjs +345 -162
  9. package/dist/index.mjs.map +1 -1
  10. package/dist/index.node.cjs +345 -162
  11. package/dist/index.node.cjs.map +1 -1
  12. package/dist/index.node.mjs +345 -162
  13. package/dist/index.node.mjs.map +1 -1
  14. package/dist/package.json.min.mjs +1 -1
  15. package/dist/package.json.mjs +1 -1
  16. package/dist/src/shapes/Line.d.ts +32 -86
  17. package/dist/src/shapes/Line.d.ts.map +1 -1
  18. package/dist/src/shapes/Line.min.mjs +1 -1
  19. package/dist/src/shapes/Line.min.mjs.map +1 -1
  20. package/dist/src/shapes/Line.mjs +345 -161
  21. package/dist/src/shapes/Line.mjs.map +1 -1
  22. package/dist-extensions/src/shapes/CustomLine.d.ts +10 -0
  23. package/dist-extensions/src/shapes/CustomLine.d.ts.map +1 -0
  24. package/dist-extensions/src/shapes/Line.d.ts +32 -86
  25. package/dist-extensions/src/shapes/Line.d.ts.map +1 -1
  26. package/fabric-test-editor.html +157 -8
  27. package/fabric-test2.html +513 -0
  28. package/fabric.ts +182 -182
  29. package/package.json +1 -1
  30. package/src/shapes/Line.ts +397 -164
  31. package/debug/konva/CHANGELOG.md +0 -1474
  32. package/debug/konva/LICENSE +0 -22
  33. package/debug/konva/README.md +0 -205
  34. package/debug/konva/gulpfile.mjs +0 -110
  35. package/debug/konva/package.json +0 -139
  36. package/debug/konva/release.sh +0 -65
  37. package/debug/konva/resources/doc-includes/ContainerParams.txt +0 -6
  38. package/debug/konva/resources/doc-includes/NodeParams.txt +0 -20
  39. package/debug/konva/resources/doc-includes/ShapeParams.txt +0 -53
  40. package/debug/konva/resources/jsdoc.conf.json +0 -28
  41. package/debug/konva/rollup.config.mjs +0 -32
  42. package/debug/konva/src/Animation.ts +0 -237
  43. package/debug/konva/src/BezierFunctions.ts +0 -826
  44. package/debug/konva/src/Canvas.ts +0 -193
  45. package/debug/konva/src/Container.ts +0 -649
  46. package/debug/konva/src/Context.ts +0 -1017
  47. package/debug/konva/src/Core.ts +0 -5
  48. package/debug/konva/src/DragAndDrop.ts +0 -173
  49. package/debug/konva/src/Factory.ts +0 -246
  50. package/debug/konva/src/FastLayer.ts +0 -29
  51. package/debug/konva/src/Global.ts +0 -210
  52. package/debug/konva/src/Group.ts +0 -31
  53. package/debug/konva/src/Layer.ts +0 -546
  54. package/debug/konva/src/Node.ts +0 -3477
  55. package/debug/konva/src/PointerEvents.ts +0 -67
  56. package/debug/konva/src/Shape.ts +0 -2081
  57. package/debug/konva/src/Stage.ts +0 -1000
  58. package/debug/konva/src/Tween.ts +0 -811
  59. package/debug/konva/src/Util.ts +0 -1123
  60. package/debug/konva/src/Validators.ts +0 -210
  61. package/debug/konva/src/_CoreInternals.ts +0 -85
  62. package/debug/konva/src/_FullInternals.ts +0 -171
  63. package/debug/konva/src/canvas-backend.ts +0 -36
  64. package/debug/konva/src/filters/Blur.ts +0 -388
  65. package/debug/konva/src/filters/Brighten.ts +0 -48
  66. package/debug/konva/src/filters/Brightness.ts +0 -30
  67. package/debug/konva/src/filters/Contrast.ts +0 -75
  68. package/debug/konva/src/filters/Emboss.ts +0 -207
  69. package/debug/konva/src/filters/Enhance.ts +0 -154
  70. package/debug/konva/src/filters/Grayscale.ts +0 -25
  71. package/debug/konva/src/filters/HSL.ts +0 -108
  72. package/debug/konva/src/filters/HSV.ts +0 -106
  73. package/debug/konva/src/filters/Invert.ts +0 -23
  74. package/debug/konva/src/filters/Kaleidoscope.ts +0 -274
  75. package/debug/konva/src/filters/Mask.ts +0 -220
  76. package/debug/konva/src/filters/Noise.ts +0 -44
  77. package/debug/konva/src/filters/Pixelate.ts +0 -107
  78. package/debug/konva/src/filters/Posterize.ts +0 -46
  79. package/debug/konva/src/filters/RGB.ts +0 -82
  80. package/debug/konva/src/filters/RGBA.ts +0 -103
  81. package/debug/konva/src/filters/Sepia.ts +0 -27
  82. package/debug/konva/src/filters/Solarize.ts +0 -29
  83. package/debug/konva/src/filters/Threshold.ts +0 -44
  84. package/debug/konva/src/index.ts +0 -3
  85. package/debug/konva/src/shapes/Arc.ts +0 -176
  86. package/debug/konva/src/shapes/Arrow.ts +0 -231
  87. package/debug/konva/src/shapes/Circle.ts +0 -76
  88. package/debug/konva/src/shapes/Ellipse.ts +0 -121
  89. package/debug/konva/src/shapes/Image.ts +0 -319
  90. package/debug/konva/src/shapes/Label.ts +0 -386
  91. package/debug/konva/src/shapes/Line.ts +0 -364
  92. package/debug/konva/src/shapes/Path.ts +0 -1013
  93. package/debug/konva/src/shapes/Rect.ts +0 -79
  94. package/debug/konva/src/shapes/RegularPolygon.ts +0 -167
  95. package/debug/konva/src/shapes/Ring.ts +0 -94
  96. package/debug/konva/src/shapes/Sprite.ts +0 -370
  97. package/debug/konva/src/shapes/Star.ts +0 -125
  98. package/debug/konva/src/shapes/Text.ts +0 -1065
  99. package/debug/konva/src/shapes/TextPath.ts +0 -583
  100. package/debug/konva/src/shapes/Transformer.ts +0 -1889
  101. package/debug/konva/src/shapes/Wedge.ts +0 -129
  102. package/debug/konva/src/skia-backend.ts +0 -35
  103. package/debug/konva/src/types.ts +0 -84
  104. package/debug/konva/tsconfig.json +0 -31
  105. package/debug/konva/tsconfig.test.json +0 -7
@@ -1,546 +0,0 @@
1
- import { Util } from './Util.ts';
2
- import type { ContainerConfig } from './Container.ts';
3
- import { Container } from './Container.ts';
4
- import { Node } from './Node.ts';
5
- import { Factory } from './Factory.ts';
6
- import { SceneCanvas, HitCanvas } from './Canvas.ts';
7
- import type { Stage } from './Stage.ts';
8
- import { getBooleanValidator } from './Validators.ts';
9
-
10
- import type { GetSet, Vector2d } from './types.ts';
11
- import type { Group } from './Group.ts';
12
- import type { Shape } from './Shape.ts';
13
- import { shapes } from './Shape.ts';
14
- import { _registerNode } from './Global.ts';
15
-
16
- export interface LayerConfig extends ContainerConfig {
17
- clearBeforeDraw?: boolean;
18
- hitGraphEnabled?: boolean;
19
- imageSmoothingEnabled?: boolean;
20
- }
21
-
22
- // constants
23
- const HASH = '#',
24
- BEFORE_DRAW = 'beforeDraw',
25
- DRAW = 'draw',
26
- /*
27
- * 2 - 3 - 4
28
- * | |
29
- * 1 - 0 5
30
- * |
31
- * 8 - 7 - 6
32
- */
33
- INTERSECTION_OFFSETS = [
34
- { x: 0, y: 0 }, // 0
35
- { x: -1, y: -1 }, // 2
36
- { x: 1, y: -1 }, // 4
37
- { x: 1, y: 1 }, // 6
38
- { x: -1, y: 1 }, // 8
39
- ],
40
- INTERSECTION_OFFSETS_LEN = INTERSECTION_OFFSETS.length;
41
-
42
- /**
43
- * Layer constructor. Layers are tied to their own canvas element and are used
44
- * to contain groups or shapes.
45
- * @constructor
46
- * @memberof Konva
47
- * @augments Konva.Container
48
- * @param {Object} config
49
- * @param {Boolean} [config.clearBeforeDraw] set this property to false if you don't want
50
- * to clear the canvas before each layer draw. The default value is true.
51
- * @@nodeParams
52
- * @@containerParams
53
- * @example
54
- * var layer = new Konva.Layer();
55
- * stage.add(layer);
56
- * // now you can add shapes, groups into the layer
57
- */
58
-
59
- export class Layer extends Container<Group | Shape> {
60
- canvas = new SceneCanvas();
61
- hitCanvas = new HitCanvas({
62
- pixelRatio: 1,
63
- });
64
-
65
- _waitingForDraw = false;
66
-
67
- constructor(config?: LayerConfig) {
68
- super(config);
69
- this.on('visibleChange.konva', this._checkVisibility);
70
- this._checkVisibility();
71
-
72
- this.on('imageSmoothingEnabledChange.konva', this._setSmoothEnabled);
73
- this._setSmoothEnabled();
74
- }
75
- // for nodejs?
76
- createPNGStream() {
77
- const c = this.canvas._canvas as any;
78
- return c.createPNGStream();
79
- }
80
- /**
81
- * get layer canvas wrapper
82
- * @method
83
- * @name Konva.Layer#getCanvas
84
- */
85
- getCanvas() {
86
- return this.canvas;
87
- }
88
- /**
89
- * get native canvas element
90
- * @method
91
- * @name Konva.Layer#getNativeCanvasElement
92
- */
93
- getNativeCanvasElement() {
94
- return this.canvas._canvas;
95
- }
96
- /**
97
- * get layer hit canvas
98
- * @method
99
- * @name Konva.Layer#getHitCanvas
100
- */
101
- getHitCanvas() {
102
- return this.hitCanvas;
103
- }
104
- /**
105
- * get layer canvas context
106
- * @method
107
- * @name Konva.Layer#getContext
108
- */
109
- getContext() {
110
- return this.getCanvas().getContext();
111
- }
112
- // TODO: deprecate this method
113
- clear(bounds?) {
114
- this.getContext().clear(bounds);
115
- this.getHitCanvas().getContext().clear(bounds);
116
- return this;
117
- }
118
- // extend Node.prototype.setZIndex
119
- setZIndex(index: number) {
120
- super.setZIndex(index);
121
- const stage = this.getStage();
122
- if (stage && stage.content) {
123
- stage.content.removeChild(this.getNativeCanvasElement());
124
-
125
- if (index < stage.children.length - 1) {
126
- stage.content.insertBefore(
127
- this.getNativeCanvasElement(),
128
- stage.children[index + 1].getCanvas()._canvas
129
- );
130
- } else {
131
- stage.content.appendChild(this.getNativeCanvasElement());
132
- }
133
- }
134
- return this;
135
- }
136
- moveToTop() {
137
- Node.prototype.moveToTop.call(this);
138
- const stage = this.getStage();
139
- if (stage && stage.content) {
140
- stage.content.removeChild(this.getNativeCanvasElement());
141
- stage.content.appendChild(this.getNativeCanvasElement());
142
- }
143
- return true;
144
- }
145
- moveUp() {
146
- const moved = Node.prototype.moveUp.call(this);
147
- if (!moved) {
148
- return false;
149
- }
150
- const stage = this.getStage();
151
- if (!stage || !stage.content) {
152
- return false;
153
- }
154
- stage.content.removeChild(this.getNativeCanvasElement());
155
-
156
- if (this.index < stage.children.length - 1) {
157
- stage.content.insertBefore(
158
- this.getNativeCanvasElement(),
159
- stage.children[this.index + 1].getCanvas()._canvas
160
- );
161
- } else {
162
- stage.content.appendChild(this.getNativeCanvasElement());
163
- }
164
- return true;
165
- }
166
- // extend Node.prototype.moveDown
167
- moveDown() {
168
- if (Node.prototype.moveDown.call(this)) {
169
- const stage = this.getStage();
170
- if (stage) {
171
- const children = stage.children;
172
- if (stage.content) {
173
- stage.content.removeChild(this.getNativeCanvasElement());
174
- stage.content.insertBefore(
175
- this.getNativeCanvasElement(),
176
- children[this.index + 1].getCanvas()._canvas
177
- );
178
- }
179
- }
180
- return true;
181
- }
182
- return false;
183
- }
184
- // extend Node.prototype.moveToBottom
185
- moveToBottom() {
186
- if (Node.prototype.moveToBottom.call(this)) {
187
- const stage = this.getStage();
188
- if (stage) {
189
- const children = stage.children;
190
- if (stage.content) {
191
- stage.content.removeChild(this.getNativeCanvasElement());
192
- stage.content.insertBefore(
193
- this.getNativeCanvasElement(),
194
- children[1].getCanvas()._canvas
195
- );
196
- }
197
- }
198
- return true;
199
- }
200
- return false;
201
- }
202
- getLayer() {
203
- return this;
204
- }
205
- remove() {
206
- const _canvas = this.getNativeCanvasElement();
207
-
208
- Node.prototype.remove.call(this);
209
-
210
- if (_canvas && _canvas.parentNode && Util._isInDocument(_canvas)) {
211
- _canvas.parentNode.removeChild(_canvas);
212
- }
213
- return this;
214
- }
215
- getStage() {
216
- return this.parent as Stage;
217
- }
218
- setSize({ width, height }) {
219
- this.canvas.setSize(width, height);
220
- this.hitCanvas.setSize(width, height);
221
- this._setSmoothEnabled();
222
- return this;
223
- }
224
- _validateAdd(child) {
225
- const type = child.getType();
226
- if (type !== 'Group' && type !== 'Shape') {
227
- Util.throw('You may only add groups and shapes to a layer.');
228
- }
229
- }
230
- _toKonvaCanvas(config) {
231
- config = config || {};
232
- config.width = config.width || this.getWidth();
233
- config.height = config.height || this.getHeight();
234
- config.x = config.x !== undefined ? config.x : this.x();
235
- config.y = config.y !== undefined ? config.y : this.y();
236
-
237
- return Node.prototype._toKonvaCanvas.call(this, config);
238
- }
239
-
240
- _checkVisibility() {
241
- const visible = this.visible();
242
- if (visible) {
243
- this.canvas._canvas.style.display = 'block';
244
- } else {
245
- this.canvas._canvas.style.display = 'none';
246
- }
247
- }
248
-
249
- _setSmoothEnabled() {
250
- this.getContext()._context.imageSmoothingEnabled =
251
- this.imageSmoothingEnabled();
252
- }
253
- /**
254
- * get/set width of layer. getter return width of stage. setter doing nothing.
255
- * if you want change width use `stage.width(value);`
256
- * @name Konva.Layer#width
257
- * @method
258
- * @returns {Number}
259
- * @example
260
- * var width = layer.width();
261
- */
262
- getWidth() {
263
- if (this.parent) {
264
- return this.parent.width();
265
- }
266
- }
267
- setWidth() {
268
- Util.warn(
269
- 'Can not change width of layer. Use "stage.width(value)" function instead.'
270
- );
271
- }
272
- /**
273
- * get/set height of layer.getter return height of stage. setter doing nothing.
274
- * if you want change height use `stage.height(value);`
275
- * @name Konva.Layer#height
276
- * @method
277
- * @returns {Number}
278
- * @example
279
- * var height = layer.height();
280
- */
281
- getHeight() {
282
- if (this.parent) {
283
- return this.parent.height();
284
- }
285
- }
286
- setHeight() {
287
- Util.warn(
288
- 'Can not change height of layer. Use "stage.height(value)" function instead.'
289
- );
290
- }
291
-
292
- /**
293
- * batch draw. this function will not do immediate draw
294
- * but it will schedule drawing to next tick (requestAnimFrame)
295
- * @method
296
- * @name Konva.Layer#batchDraw
297
- * @return {Konva.Layer} this
298
- */
299
- batchDraw() {
300
- if (!this._waitingForDraw) {
301
- this._waitingForDraw = true;
302
- Util.requestAnimFrame(() => {
303
- this.draw();
304
- this._waitingForDraw = false;
305
- });
306
- }
307
- return this;
308
- }
309
-
310
- /**
311
- * get visible intersection shape. This is the preferred
312
- * method for determining if a point intersects a shape or not
313
- * also you may pass optional selector parameter to return ancestor of intersected shape
314
- * nodes with listening set to false will not be detected
315
- * @method
316
- * @name Konva.Layer#getIntersection
317
- * @param {Object} pos
318
- * @param {Number} pos.x
319
- * @param {Number} pos.y
320
- * @returns {Konva.Node}
321
- * @example
322
- * var shape = layer.getIntersection({x: 50, y: 50});
323
- */
324
- getIntersection(pos: Vector2d) {
325
- if (!this.isListening() || !this.isVisible()) {
326
- return null;
327
- }
328
- // in some cases antialiased area may be bigger than 1px
329
- // it is possible if we will cache node, then scale it a lot
330
- let spiralSearchDistance = 1;
331
- let continueSearch = false;
332
- while (true) {
333
- for (let i = 0; i < INTERSECTION_OFFSETS_LEN; i++) {
334
- const intersectionOffset = INTERSECTION_OFFSETS[i];
335
- const obj = this._getIntersection({
336
- x: pos.x + intersectionOffset.x * spiralSearchDistance,
337
- y: pos.y + intersectionOffset.y * spiralSearchDistance,
338
- });
339
- const shape = obj.shape;
340
- if (shape) {
341
- return shape;
342
- }
343
- // we should continue search if we found antialiased pixel
344
- // that means our node somewhere very close
345
- continueSearch = !!obj.antialiased;
346
- // stop search if found empty pixel
347
- if (!obj.antialiased) {
348
- break;
349
- }
350
- }
351
- // if no shape, and no antialiased pixel, we should end searching
352
- if (continueSearch) {
353
- spiralSearchDistance += 1;
354
- } else {
355
- return null;
356
- }
357
- }
358
- }
359
- _getIntersection(pos: Vector2d): { shape?: Shape; antialiased?: boolean } {
360
- const ratio = this.hitCanvas.pixelRatio;
361
- const p = this.hitCanvas.context.getImageData(
362
- Math.round(pos.x * ratio),
363
- Math.round(pos.y * ratio),
364
- 1,
365
- 1
366
- ).data;
367
- const p3 = p[3];
368
-
369
- // fully opaque pixel
370
- if (p3 === 255) {
371
- const colorKey = Util._rgbToHex(p[0], p[1], p[2]);
372
- const shape = shapes[HASH + colorKey];
373
- if (shape) {
374
- return {
375
- shape: shape,
376
- };
377
- }
378
- return {
379
- antialiased: true,
380
- };
381
- } else if (p3 > 0) {
382
- // antialiased pixel
383
- return {
384
- antialiased: true,
385
- };
386
- }
387
- // empty pixel
388
- return {};
389
- }
390
- drawScene(can?: SceneCanvas, top?: Node, bufferCanvas?: SceneCanvas) {
391
- const layer = this.getLayer(),
392
- canvas = can || (layer && layer.getCanvas());
393
-
394
- this._fire(BEFORE_DRAW, {
395
- node: this,
396
- });
397
-
398
- if (this.clearBeforeDraw()) {
399
- canvas.getContext().clear();
400
- }
401
-
402
- Container.prototype.drawScene.call(this, canvas, top, bufferCanvas);
403
-
404
- this._fire(DRAW, {
405
- node: this,
406
- });
407
-
408
- return this;
409
- }
410
- drawHit(can?: HitCanvas, top?: Node) {
411
- const layer = this.getLayer(),
412
- canvas = can || (layer && layer.hitCanvas);
413
-
414
- if (layer && layer.clearBeforeDraw()) {
415
- layer.getHitCanvas().getContext().clear();
416
- }
417
-
418
- Container.prototype.drawHit.call(this, canvas, top);
419
- return this;
420
- }
421
- /**
422
- * enable hit graph. **DEPRECATED!** Use `layer.listening(true)` instead.
423
- * @name Konva.Layer#enableHitGraph
424
- * @method
425
- * @returns {Layer}
426
- */
427
- enableHitGraph() {
428
- this.hitGraphEnabled(true);
429
- return this;
430
- }
431
- /**
432
- * disable hit graph. **DEPRECATED!** Use `layer.listening(false)` instead.
433
- * @name Konva.Layer#disableHitGraph
434
- * @method
435
- * @returns {Layer}
436
- */
437
- disableHitGraph() {
438
- this.hitGraphEnabled(false);
439
- return this;
440
- }
441
-
442
- setHitGraphEnabled(val) {
443
- Util.warn(
444
- 'hitGraphEnabled method is deprecated. Please use layer.listening() instead.'
445
- );
446
- this.listening(val);
447
- }
448
-
449
- getHitGraphEnabled(val) {
450
- Util.warn(
451
- 'hitGraphEnabled method is deprecated. Please use layer.listening() instead.'
452
- );
453
- return this.listening();
454
- }
455
-
456
- /**
457
- * Show or hide hit canvas over the stage. May be useful for debugging custom hitFunc
458
- * @name Konva.Layer#toggleHitCanvas
459
- * @method
460
- */
461
- toggleHitCanvas() {
462
- if (!this.parent || !this.parent['content']) {
463
- return;
464
- }
465
- const parent = this.parent as any;
466
- const added = !!this.hitCanvas._canvas.parentNode;
467
- if (added) {
468
- parent.content.removeChild(this.hitCanvas._canvas);
469
- } else {
470
- parent.content.appendChild(this.hitCanvas._canvas);
471
- }
472
- }
473
-
474
- destroy(): this {
475
- Util.releaseCanvas(
476
- this.getNativeCanvasElement(),
477
- this.getHitCanvas()._canvas
478
- );
479
- return super.destroy();
480
- }
481
-
482
- hitGraphEnabled: GetSet<boolean, this>;
483
-
484
- clearBeforeDraw: GetSet<boolean, this>;
485
- imageSmoothingEnabled: GetSet<boolean, this>;
486
- }
487
-
488
- Layer.prototype.nodeType = 'Layer';
489
- _registerNode(Layer);
490
-
491
- /**
492
- * get/set imageSmoothingEnabled flag
493
- * For more info see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled
494
- * @name Konva.Layer#imageSmoothingEnabled
495
- * @method
496
- * @param {Boolean} imageSmoothingEnabled
497
- * @returns {Boolean}
498
- * @example
499
- * // get imageSmoothingEnabled flag
500
- * var imageSmoothingEnabled = layer.imageSmoothingEnabled();
501
- *
502
- * layer.imageSmoothingEnabled(false);
503
- *
504
- * layer.imageSmoothingEnabled(true);
505
- */
506
- Factory.addGetterSetter(Layer, 'imageSmoothingEnabled', true);
507
-
508
- /**
509
- * get/set clearBeforeDraw flag which determines if the layer is cleared or not
510
- * before drawing
511
- * @name Konva.Layer#clearBeforeDraw
512
- * @method
513
- * @param {Boolean} clearBeforeDraw
514
- * @returns {Boolean}
515
- * @example
516
- * // get clearBeforeDraw flag
517
- * var clearBeforeDraw = layer.clearBeforeDraw();
518
- *
519
- * // disable clear before draw
520
- * layer.clearBeforeDraw(false);
521
- *
522
- * // enable clear before draw
523
- * layer.clearBeforeDraw(true);
524
- */
525
- Factory.addGetterSetter(Layer, 'clearBeforeDraw', true);
526
-
527
- Factory.addGetterSetter(Layer, 'hitGraphEnabled', true, getBooleanValidator());
528
- /**
529
- * get/set hitGraphEnabled flag. **DEPRECATED!** Use `layer.listening(false)` instead.
530
- * Disabling the hit graph will greatly increase
531
- * draw performance because the hit graph will not be redrawn each time the layer is
532
- * drawn. This, however, also disables mouse/touch event detection
533
- * @name Konva.Layer#hitGraphEnabled
534
- * @method
535
- * @param {Boolean} enabled
536
- * @returns {Boolean}
537
- * @example
538
- * // get hitGraphEnabled flag
539
- * var hitGraphEnabled = layer.hitGraphEnabled();
540
- *
541
- * // disable hit graph
542
- * layer.hitGraphEnabled(false);
543
- *
544
- * // enable hit graph
545
- * layer.hitGraphEnabled(true);
546
- */