소스 검색

#316 removed flickering

Rodja Trappe 2 년 전
부모
커밋
705bd69e3b
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      nicegui/elements/interactive_image.js

+ 2 - 1
nicegui/elements/interactive_image.js

@@ -7,7 +7,7 @@ export default {
           <line x1="100" y1="0" x2="100" y2="100%" stroke="black" />
           <line x1="0" y1="100" x2="100%" y2="100" stroke="black" />
         </g>
-        <g v-html="content"></g>
+        <g v-html="content" style="display:none"></g>
       </svg>
     </div>
   `,
@@ -46,6 +46,7 @@ export default {
     this.image.onload = (e) => {
       const viewBox = `0 0 ${this.image.naturalWidth} ${this.image.naturalHeight}`;
       this.svg.setAttribute("viewBox", viewBox);
+      this.svg.lastChild.setAttribute("style", "");
     };
     this.image.src = this.src;
     for (const type of this.events) {