瀏覽代碼

scale img to fill the whole interactive image element

Falko Schindler 3 年之前
父節點
當前提交
57d18543bf
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      nicegui/elements/interactive_image.js

+ 2 - 2
nicegui/elements/interactive_image.js

@@ -1,7 +1,7 @@
 Vue.component("interactive_image", {
   template: `
-    <div :id="jp_props.id" style="position:relative;" :style="jp_props.style" :class="jp_props.classes">
-      <img style="max-width:100%">
+    <div :id="jp_props.id" style="position:relative" :style="jp_props.style" :class="jp_props.classes">
+      <img style="width:100%; height:100%">
       <svg style="position:absolute;top:0;left:0;pointer-events:none">
         <g style="display:none">
           <line x1="100" y1="0" x2="100" y2="100%" stroke="black" />