@antv/l7-renderer 2.17.3 → 2.17.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/es/regl/ReglBuffer.d.ts
CHANGED
package/es/regl/ReglBuffer.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
4
|
import { gl } from '@antv/l7-core';
|
|
4
5
|
import { dataTypeMap, usageMap } from "./constants";
|
|
5
6
|
|
|
@@ -10,6 +11,7 @@ import { dataTypeMap, usageMap } from "./constants";
|
|
|
10
11
|
var ReglBuffer = /*#__PURE__*/function () {
|
|
11
12
|
function ReglBuffer(reGl, options) {
|
|
12
13
|
_classCallCheck(this, ReglBuffer);
|
|
14
|
+
_defineProperty(this, "isDestroyed", false);
|
|
13
15
|
var data = options.data,
|
|
14
16
|
usage = options.usage,
|
|
15
17
|
type = options.type;
|
|
@@ -28,7 +30,10 @@ var ReglBuffer = /*#__PURE__*/function () {
|
|
|
28
30
|
}, {
|
|
29
31
|
key: "destroy",
|
|
30
32
|
value: function destroy() {
|
|
31
|
-
this.
|
|
33
|
+
if (!this.isDestroyed) {
|
|
34
|
+
this.buffer.destroy();
|
|
35
|
+
}
|
|
36
|
+
this.isDestroyed = true;
|
|
32
37
|
}
|
|
33
38
|
}, {
|
|
34
39
|
key: "subData",
|
package/lib/regl/ReglBuffer.js
CHANGED
|
@@ -26,6 +26,7 @@ var import_l7_core = require("@antv/l7-core");
|
|
|
26
26
|
var import_constants = require("./constants");
|
|
27
27
|
var ReglBuffer = class {
|
|
28
28
|
constructor(reGl, options) {
|
|
29
|
+
this.isDestroyed = false;
|
|
29
30
|
const { data, usage, type } = options;
|
|
30
31
|
this.buffer = reGl.buffer({
|
|
31
32
|
data,
|
|
@@ -38,7 +39,10 @@ var ReglBuffer = class {
|
|
|
38
39
|
return this.buffer;
|
|
39
40
|
}
|
|
40
41
|
destroy() {
|
|
41
|
-
this.
|
|
42
|
+
if (!this.isDestroyed) {
|
|
43
|
+
this.buffer.destroy();
|
|
44
|
+
}
|
|
45
|
+
this.isDestroyed = true;
|
|
42
46
|
}
|
|
43
47
|
subData({
|
|
44
48
|
data,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-renderer",
|
|
3
|
-
"version": "2.17.
|
|
3
|
+
"version": "2.17.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"author": "xiaoiver",
|
|
26
26
|
"license": "ISC",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@antv/l7-test-utils": "2.17.
|
|
28
|
+
"@antv/l7-test-utils": "2.17.5",
|
|
29
29
|
"gl": "^5.0.3"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@antv/l7-core": "2.17.
|
|
33
|
-
"@antv/l7-utils": "2.17.
|
|
32
|
+
"@antv/l7-core": "2.17.5",
|
|
33
|
+
"@antv/l7-utils": "2.17.5",
|
|
34
34
|
"@babel/runtime": "^7.7.7",
|
|
35
35
|
"inversify": "^5.0.1",
|
|
36
36
|
"l7regl": "^0.0.20",
|
|
37
37
|
"lodash": "^4.17.15",
|
|
38
38
|
"reflect-metadata": "^0.1.13"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "9da38170fe5ac1bec6a92b5e75f23ecf573c6d9c",
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
}
|