fl-web-component 2.0.6 → 2.0.7

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.
@@ -231,25 +231,27 @@ MeasureAngle.prototype = {
231
231
  _this.renderer.domElement.removeEventListener('mousemove', _this.mousemove);
232
232
  }
233
233
  },
234
- close() {
234
+ close(isClear) {
235
235
  this.renderer.domElement.removeEventListener('mouseup', this.click, false);
236
236
  this.renderer.domElement.removeEventListener('mousedown', this.mousedown, false);
237
237
  this.renderer.domElement.removeEventListener('mousemove', this.mousemove, false);
238
238
  this.renderer.domElement.removeEventListener('contextmenu', this.rightClick, false);
239
- this.remove(this.points);
240
- this.remove(this.polyline);
241
- this.remove(this.labels);
242
- this.remove(this.curves);
243
- this.pointArray.splice(0);
244
- this.points.splice(0);
245
- this.polyline.splice(0);
246
- this.labels.splice(0);
247
- this.curves.splice(0);
248
- this.tempPoints = undefined;
249
- this.tempLabel = undefined;
250
- this.tempLine = undefined;
251
- this.scene.remove(this.tipsLabel);
252
- this.tipsLabel = undefined;
239
+ if (!isClear) {
240
+ this.remove(this.points);
241
+ this.remove(this.polyline);
242
+ this.remove(this.labels);
243
+ this.remove(this.curves);
244
+ this.pointArray.splice(0);
245
+ this.points.splice(0);
246
+ this.polyline.splice(0);
247
+ this.labels.splice(0);
248
+ this.curves.splice(0);
249
+ this.tempPoints = undefined;
250
+ this.tempLabel = undefined;
251
+ this.tempLine = undefined;
252
+ this.scene.remove(this.tipsLabel);
253
+ this.tipsLabel = undefined;
254
+ }
253
255
  this.renderer.domElement.style.cursor = 'pointer';
254
256
  },
255
257
  remove(array) {
@@ -227,24 +227,27 @@ MeasureArea.prototype = {
227
227
  _this.renderer.domElement.removeEventListener('mousemove', _this.mousemove);
228
228
  }
229
229
  },
230
- close() {
230
+ close(isClear) {
231
231
  this.renderer.domElement.removeEventListener('mouseup', this.click);
232
232
  this.renderer.domElement.removeEventListener('mousedown', this.mousedown);
233
233
  this.renderer.domElement.removeEventListener('mousemove', this.mousemove);
234
234
  this.renderer.domElement.removeEventListener('contextmenu', this.rightClick);
235
- this.remove(this.points);
236
- this.remove(this.polyline);
237
- this.remove(this.labels);
238
- this.remove(this.polygons);
239
- this.pointArray.splice(0);
240
- this.points.splice(0);
241
- this.polyline.splice(0);
242
- this.labels.splice(0);
243
- this.tempPoints = undefined;
244
- this.tempLabel = undefined;
245
- this.tempLine = undefined;
246
- this.scene.remove(this.tipsLabel);
247
- this.tipsLabel = undefined;
235
+ if (!isClear) {
236
+ this.remove(this.points);
237
+ this.remove(this.polyline);
238
+ this.remove(this.labels);
239
+ this.remove(this.polygons);
240
+ this.pointArray.splice(0);
241
+ this.points.splice(0);
242
+ this.polyline.splice(0);
243
+ this.labels.splice(0);
244
+ this.tempPoints = undefined;
245
+ this.tempLabel = undefined;
246
+ this.tempLine = undefined;
247
+ this.scene.remove(this.tipsLabel);
248
+ this.tipsLabel = undefined;
249
+ }
250
+
248
251
  this.renderer.domElement.style.cursor = 'pointer';
249
252
  },
250
253
  remove(array) {
@@ -208,25 +208,27 @@ MeasureDistance.prototype = {
208
208
  _this.renderer.domElement.removeEventListener('mousemove', _this.mousemove);
209
209
  }
210
210
  },
211
- close() {
211
+ close(isClear) {
212
212
  this.renderer.domElement.removeEventListener('mousedown', this.mousedown);
213
213
  this.renderer.domElement.removeEventListener('mouseup', this.click);
214
214
  this.renderer.domElement.removeEventListener('mousemove', this.mousemove);
215
215
  this.renderer.domElement.removeEventListener('contextmenu', this.rightClick);
216
- this.remove(this.points);
217
- this.remove(this.polyline);
218
- this.remove(this.labels);
219
- this.pointArray.splice(0);
220
- this.points.splice(0);
221
- this.polyline.splice(0);
222
- this.labels.splice(0);
223
- this.tempPoints = undefined;
224
- this.tempLabel = undefined;
225
- this.tempLine = undefined;
226
- this.scene.remove(this.tipsLabel);
227
- this.tipsLabel = undefined;
216
+ if (!isClear) {
217
+ this.remove(this.points);
218
+ this.remove(this.polyline);
219
+ this.remove(this.labels);
220
+ this.pointArray.splice(0);
221
+ this.points.splice(0);
222
+ this.polyline.splice(0);
223
+ this.labels.splice(0);
224
+ this.tempPoints = undefined;
225
+ this.tempLabel = undefined;
226
+ this.tempLine = undefined;
227
+ this.scene.remove(this.tipsLabel);
228
+ this.tipsLabel = undefined;
229
+ this.firstTime = 0;
230
+ }
228
231
  this.renderer.domElement.style.cursor = 'pointer';
229
- this.firstTime = 0;
230
232
  },
231
233
  remove(array) {
232
234
  for (let index = 0; index < array.length; index++) {
@@ -167,21 +167,23 @@ MeasureHeight.prototype = {
167
167
  _this.isCompleted = true;
168
168
  }
169
169
  },
170
- close() {
170
+ close(isClear) {
171
171
  this.renderer.domElement.removeEventListener('mousedown', this.mousedown);
172
172
  this.renderer.domElement.removeEventListener('mouseup', this.click);
173
173
  this.renderer.domElement.removeEventListener('contextmenu', this.rightClick);
174
- this.remove(this.points);
175
- this.remove(this.polyline);
176
- this.remove(this.labels);
177
- this.pointArray.splice(0);
178
- this.points.splice(0);
179
- this.polyline.splice(0);
180
- this.labels.splice(0);
181
- this.scene.remove(this.tipsLabel);
182
- this.tipsLabel = undefined;
183
- this.renderer.domElement.style.cursor = 'pointer';
184
- this.firstTime = 0;
174
+ if (!isClear) {
175
+ this.remove(this.points);
176
+ this.remove(this.polyline);
177
+ this.remove(this.labels);
178
+ this.pointArray.splice(0);
179
+ this.points.splice(0);
180
+ this.polyline.splice(0);
181
+ this.labels.splice(0);
182
+ this.scene.remove(this.tipsLabel);
183
+ this.tipsLabel = undefined;
184
+ this.renderer.domElement.style.cursor = 'pointer';
185
+ this.firstTime = 0;
186
+ }
185
187
  },
186
188
  remove(array) {
187
189
  for (let index = 0; index < array.length; index++) {