浏览代码

do not build mapitem if not enought salient points

bach 1 年之前
父节点
当前提交
a324ffc806
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/components/ConcernementMapItem.vue

+ 5 - 2
src/components/ConcernementMapItem.vue

@@ -78,8 +78,11 @@ export default {
     
     this.parsePoints()
     this.getSalientPoints()
-    if (this.canvasMap) {
-      this.initCanvasMap()
+
+    if (this.salientPoints.length > 3) { // do not build item if it doesn't get enougth salient points
+      if (this.canvasMap) {
+        this.initCanvasMap()
+      }  
     }
 
   },