소스 검색

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()
+      }  
     }
 
   },