fl-web-component 2.1.2 → 2.1.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.fl-model-containor[data-v-b87e98f6]{width:100%;height:100%;position:relative;cursor:pointer}[data-v-b87e98f6] .tips-label{width:60px;color:#000;font:12px Helvetica;margin-top:-3em;padding:5px;text-align:center;vertical-align:middle;background-color:khaki}[data-v-b87e98f6] .measure-label{max-width:100px;margin-top:-1em;border:10px;border-radius:5px;padding:3px 10px;cursor:pointer;color:#009bea;background-color:#f4f4f4;-webkit-box-shadow:0 1px 3px 1px rgba(0,0,0,.25);box-shadow:0 1px 3px 1px rgba(0,0,0,.25)}[data-v-b87e98f6] .circle-tag{width:10px;height:10px;margin-top:5px;border-radius:50%;background-color:#ff5000}[data-v-b87e98f6] .measure-label-font{word-break:break-all}[data-v-b87e98f6] .mark-label-img{padding-top:5px;width:20px;height:20px}.loading-overlay[data-v-b87e98f6]{position:absolute;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.7);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;z-index:1000;opacity:0;visibility:hidden;-webkit-transition:opacity .3s ease,visibility .3s ease;transition:opacity .3s ease,visibility .3s ease}.loading-overlay--visible[data-v-b87e98f6]{opacity:1;visibility:visible}.loading-content[data-v-b87e98f6]{background:#fff;border-radius:12px;padding:30px;text-align:center;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.3);box-shadow:0 8px 32px rgba(0,0,0,.3);min-width:300px;max-width:400px}.loading-spinner[data-v-b87e98f6]{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #409eff;border-radius:50%;-webkit-animation:spin-b87e98f6 1s linear infinite;animation:spin-b87e98f6 1s linear infinite;margin:0 auto 20px}@-webkit-keyframes spin-b87e98f6{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin-b87e98f6{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.loading-text[data-v-b87e98f6]{font-size:16px;font-weight:500;color:#333;margin-bottom:20px}.loading-this.progress-bar[data-v-b87e98f6]{width:100%;height:8px;background-color:#f0f0f0;border-radius:4px;overflow:hidden;margin-bottom:15px}.loading-this.progress-fill[data-v-b87e98f6]{height:100%;background:-webkit-gradient(linear,left top,right top,from(#409eff),to(#67c23a));background:linear-gradient(90deg,#409eff,#67c23a);border-radius:4px;-webkit-transition:width .3s ease;transition:width .3s ease}.loading-details[data-v-b87e98f6]{font-size:12px;color:#666;line-height:1.5}.lil-this.gui{background:hsla(0,0%,100%,.95)!important;border:1px solid #e0e0e0!important;border-radius:8px!important;-webkit-box-shadow:0 4px 12px rgba(0,0,0,.15)!important;box-shadow:0 4px 12px rgba(0,0,0,.15)!important;backdrop-filter:blur(10px)!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif!important}.lil-this.gui .title{background:linear-gradient(135deg,#f8f9fa,#e9ecef)!important;color:#495057!important;border-bottom:1px solid #dee2e6!important;font-weight:600!important;padding:0 12px!important;border-radius:8px 8px 0 0!important}.lil-this.gui .controller{border-bottom:1px solid #f1f3f4!important;background:transparent!important}.lil-this.gui .controller:last-child{border-bottom:none!important}.lil-this.gui .controller .name{color:#495057!important;font-weight:500!important;font-size:12px!important}.lil-this.gui .controller .widget{background:#f8f9fa!important;border:1px solid #ced4da!important;border-radius:4px!important;color:#495057!important}.lil-this.gui .controller .widget:focus,.lil-this.gui .controller .widget:hover{border-color:#80bdff!important;-webkit-box-shadow:0 0 0 2px rgba(0,123,255,.25)!important;box-shadow:0 0 0 2px rgba(0,123,255,.25)!important}.lil-this.gui .controller .widget:focus{outline:none!important}.lil-this.gui .controller input[type=range]{background:#e9ecef!important;height:4px!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;border-radius:2px!important}.lil-this.gui .controller.number .fill{border-right:solid #008de9}.lil-this.gui .controller input[type=range]::-webkit-slider-thumb{background:#007bff!important;border:2px solid #fff!important;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.2)!important;box-shadow:0 2px 4px rgba(0,0,0,.2)!important;width:16px!important;height:16px!important;border-radius:50%!important;-webkit-appearance:none!important;appearance:none!important;cursor:pointer!important}.lil-this.gui .controller input[type=range]::-moz-range-thumb{background:#007bff!important;border:2px solid #fff!important;box-shadow:0 2px 4px rgba(0,0,0,.2)!important;width:16px!important;height:16px!important;border-radius:50%!important;cursor:pointer!important}.lil-this.gui .controller .option{background:#fff!important;color:#495057!important;border-bottom:1px solid #f1f3f4!important}.lil-this.gui .controller .option:hover{background:#f8f9fa!important}.lil-this.gui .controller .option:last-child{border-bottom:none!important}.lil-this.gui input:active{background:#e6eff4}.lil-this.gui .controller button{background:linear-gradient(135deg,#007bff,#0056b3)!important;color:#fff!important;border:none!important;border-radius:4px!important;font-weight:500!important;-webkit-transition:all .2s ease!important;transition:all .2s ease!important}.lil-this.gui .controller button:hover{background:linear-gradient(135deg,#0056b3,#004085)!important;-webkit-transform:translateY(-1px)!important;transform:translateY(-1px)!important;-webkit-box-shadow:0 4px 8px rgba(0,123,255,.3)!important;box-shadow:0 4px 8px rgba(0,123,255,.3)!important}.lil-this.gui .controller .color{border:2px solid #fff!important;border-radius:4px!important;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.1)!important;box-shadow:0 2px 4px rgba(0,0,0,.1)!important}.lil-this.gui .controller.number .slider,.lil-this.gui .controller.number .slider:hover{background-color:#e6eff4}.lil-this.gui input,.lil-this.gui input:hover,.lil-this.gui input[type=number]:focus,.lil-this.gui input[type=text]:focus{background:#e6eff4}.lil-this.gui .controller>.name{min-width:25px}.lil-this.gui .controller.number input{color:#2e3136}.lil-this.gui .controller.number .slider:active{background-color:#e6eff4}.lil-this.gui .folder>.title{background:linear-gradient(135deg,#f1f3f4,#e9ecef)!important;color:#495057!important;border-bottom:1px solid #dee2e6!important}.lil-this.gui .folder>.title:before{color:#6c757d!important}.lil-this.gui .folder.closed>.children{display:none!important}#konva-container[data-v-11780588]{z-index:3;width:100%;height:100%;cursor:pointer;overflow:hidden}span[data-v-f547d5c6]{font-weight:bolder}.text[data-v-f547d5c6]{margin-top:20px}.line[data-v-f547d5c6]{border-bottom:1px solid #dcdfe6;margin:20px 0}.center[data-v-f547d5c6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.center .cen span[data-v-f547d5c6],.center .top span[data-v-f547d5c6]{color:"#53a8ff";display:inline-block;width:30px;height:30px;text-align:center;line-height:30px;border:1px solid;padding:5px;margin-bottom:10px;background-color:#e9f3ff}.center .cen span[data-v-f547d5c6]{margin:10px}.button[data-v-f547d5c6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:end;margin-top:20px}@font-face{font-family:iconfont;src:url(//at.alicdn.com/t/font_3226805_qqvo3ag3r8.woff2?t=1646635700216) format("woff2"),url(//at.alicdn.com/t/font_3226805_qqvo3ag3r8.woff?t=1646635700216) format("woff"),url(//at.alicdn.com/t/font_3226805_qqvo3ag3r8.ttf?t=1646635700216) format("truetype")}.iconfont[data-v-f547d5c6]{font-family:iconfont!important;font-size:50px;font-style:normal;color:"#53a8ff";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-shubiao[data-v-f547d5c6]:before{content:""}.main_body[data-v-4b17bce0]{position:relative;width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.classification_title[data-v-4b17bce0]{margin:0 0 10px 0;color:#fff;font-size:14px;cursor:default}.toolbar[data-v-4b17bce0]{z-index:10;position:absolute;width:520px;padding:8px 16px;border-radius:6px;-webkit-box-shadow:0 2px 10px 0 rgba(6,29,44,.25);box-shadow:0 2px 10px 0 rgba(6,29,44,.25);background-color:#fff;top:10px;left:50%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translateX(-50%);transform:translateX(-50%);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.icon_toolbar[data-v-4b17bce0],.text_toolbar[data-v-4b17bce0]{float:left;width:32px;height:32px;padding:0!important;background-repeat:no-repeat;background-size:24px;background-position:50%}.icon_active[data-v-4b17bce0],.icon_toolbar[data-v-4b17bce0]:hover,.text_toolbar[data-v-4b17bce0]:hover{background-color:#eee}[data-v-4b17bce0].icon_color .el-color-picker__trigger{height:24px;margin-top:4px;width:24px!important}[data-v-4b17bce0].el-color-picker--medium,[data-v-4b17bce0].el-color-picker--medium .el-color-picker__trigger{width:24px!important;height:24px!important}.canvas_container[data-v-4b17bce0]{position:relative;width:100%;height:100%;overflow:auto;-webkit-box-sizing:border-box;box-sizing:border-box}.canvas_container canvas[data-v-4b17bce0]{position:absolute;left:0}.canvas_container #ctx_front[data-v-4b17bce0]{z-index:5;background-color:transparent}.canvas_container #ctx_back[data-v-4b17bce0]{z-index:3}.canvas_container #ctx_base[data-v-4b17bce0]{z-index:1}#text[data-v-4b17bce0]{position:absolute;z-index:-1;resize:none;outline:none;border:1px dashed #9c9c9c;overflow:hidden;background:transparent;line-height:30px;display:none}#text[data-v-4b17bce0]:hover{border:1px dashed #53a8ff}#svg-component[data-v-2572c0e2],#svg-tigger[data-v-2572c0e2]{cursor:pointer;height:100%;width:100%;position:relative}#toolbar-show[data-v-2572c0e2]{z-index:20;position:absolute;width:100%;height:100%;top:0;left:0;overflow:hidden;background:#fff}
|
|
1
|
+
@charset "UTF-8";.fl-model-containor[data-v-b87e98f6]{width:100%;height:100%;position:relative;cursor:pointer}[data-v-b87e98f6] .tips-label{width:60px;color:#000;font:12px Helvetica;margin-top:-3em;padding:5px;text-align:center;vertical-align:middle;background-color:khaki}[data-v-b87e98f6] .measure-label{max-width:100px;margin-top:-1em;border:10px;border-radius:5px;padding:3px 10px;cursor:pointer;color:#009bea;background-color:#f4f4f4;-webkit-box-shadow:0 1px 3px 1px rgba(0,0,0,.25);box-shadow:0 1px 3px 1px rgba(0,0,0,.25)}[data-v-b87e98f6] .circle-tag{width:10px;height:10px;margin-top:5px;border-radius:50%;background-color:#ff5000}[data-v-b87e98f6] .measure-label-font{word-break:break-all}[data-v-b87e98f6] .mark-label-img{padding-top:5px;width:20px;height:20px}.loading-overlay[data-v-b87e98f6]{position:absolute;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.7);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;z-index:1000;opacity:0;visibility:hidden;-webkit-transition:opacity .3s ease,visibility .3s ease;transition:opacity .3s ease,visibility .3s ease}.loading-overlay--visible[data-v-b87e98f6]{opacity:1;visibility:visible}.loading-content[data-v-b87e98f6]{background:#fff;border-radius:12px;padding:30px;text-align:center;-webkit-box-shadow:0 8px 32px rgba(0,0,0,.3);box-shadow:0 8px 32px rgba(0,0,0,.3);min-width:300px;max-width:400px}.loading-spinner[data-v-b87e98f6]{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #409eff;border-radius:50%;-webkit-animation:spin-b87e98f6 1s linear infinite;animation:spin-b87e98f6 1s linear infinite;margin:0 auto 20px}@-webkit-keyframes spin-b87e98f6{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin-b87e98f6{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.loading-text[data-v-b87e98f6]{font-size:16px;font-weight:500;color:#333;margin-bottom:20px}.loading-this.progress-bar[data-v-b87e98f6]{width:100%;height:8px;background-color:#f0f0f0;border-radius:4px;overflow:hidden;margin-bottom:15px}.loading-this.progress-fill[data-v-b87e98f6]{height:100%;background:-webkit-gradient(linear,left top,right top,from(#409eff),to(#67c23a));background:linear-gradient(90deg,#409eff,#67c23a);border-radius:4px;-webkit-transition:width .3s ease;transition:width .3s ease}.loading-details[data-v-b87e98f6]{font-size:12px;color:#666;line-height:1.5}.lil-this.gui{background:hsla(0,0%,100%,.95)!important;border:1px solid #e0e0e0!important;border-radius:8px!important;-webkit-box-shadow:0 4px 12px rgba(0,0,0,.15)!important;box-shadow:0 4px 12px rgba(0,0,0,.15)!important;backdrop-filter:blur(10px)!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif!important}.lil-this.gui .title{background:linear-gradient(135deg,#f8f9fa,#e9ecef)!important;color:#495057!important;border-bottom:1px solid #dee2e6!important;font-weight:600!important;padding:0 12px!important;border-radius:8px 8px 0 0!important}.lil-this.gui .controller{border-bottom:1px solid #f1f3f4!important;background:transparent!important}.lil-this.gui .controller:last-child{border-bottom:none!important}.lil-this.gui .controller .name{color:#495057!important;font-weight:500!important;font-size:12px!important}.lil-this.gui .controller .widget{background:#f8f9fa!important;border:1px solid #ced4da!important;border-radius:4px!important;color:#495057!important}.lil-this.gui .controller .widget:focus,.lil-this.gui .controller .widget:hover{border-color:#80bdff!important;-webkit-box-shadow:0 0 0 2px rgba(0,123,255,.25)!important;box-shadow:0 0 0 2px rgba(0,123,255,.25)!important}.lil-this.gui .controller .widget:focus{outline:none!important}.lil-this.gui .controller input[type=range]{background:#e9ecef!important;height:4px!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;border-radius:2px!important}.lil-this.gui .controller.number .fill{border-right:solid #008de9}.lil-this.gui .controller input[type=range]::-webkit-slider-thumb{background:#007bff!important;border:2px solid #fff!important;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.2)!important;box-shadow:0 2px 4px rgba(0,0,0,.2)!important;width:16px!important;height:16px!important;border-radius:50%!important;-webkit-appearance:none!important;appearance:none!important;cursor:pointer!important}.lil-this.gui .controller input[type=range]::-moz-range-thumb{background:#007bff!important;border:2px solid #fff!important;box-shadow:0 2px 4px rgba(0,0,0,.2)!important;width:16px!important;height:16px!important;border-radius:50%!important;cursor:pointer!important}.lil-this.gui .controller .option{background:#fff!important;color:#495057!important;border-bottom:1px solid #f1f3f4!important}.lil-this.gui .controller .option:hover{background:#f8f9fa!important}.lil-this.gui .controller .option:last-child{border-bottom:none!important}.lil-this.gui input:active{background:#e6eff4}.lil-this.gui .controller button{background:linear-gradient(135deg,#007bff,#0056b3)!important;color:#fff!important;border:none!important;border-radius:4px!important;font-weight:500!important;-webkit-transition:all .2s ease!important;transition:all .2s ease!important}.lil-this.gui .controller button:hover{background:linear-gradient(135deg,#0056b3,#004085)!important;-webkit-transform:translateY(-1px)!important;transform:translateY(-1px)!important;-webkit-box-shadow:0 4px 8px rgba(0,123,255,.3)!important;box-shadow:0 4px 8px rgba(0,123,255,.3)!important}.lil-this.gui .controller .color{border:2px solid #fff!important;border-radius:4px!important;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.1)!important;box-shadow:0 2px 4px rgba(0,0,0,.1)!important}.lil-this.gui .controller.number .slider,.lil-this.gui .controller.number .slider:hover{background-color:#e6eff4}.lil-this.gui input,.lil-this.gui input:hover,.lil-this.gui input[type=number]:focus,.lil-this.gui input[type=text]:focus{background:#e6eff4}.lil-this.gui .controller>.name{min-width:25px}.lil-this.gui .controller.number input{color:#2e3136}.lil-this.gui .controller.number .slider:active{background-color:#e6eff4}.lil-this.gui .folder>.title{background:linear-gradient(135deg,#f1f3f4,#e9ecef)!important;color:#495057!important;border-bottom:1px solid #dee2e6!important}.lil-this.gui .folder>.title:before{color:#6c757d!important}.lil-this.gui .folder.closed>.children{display:none!important}#konva-container[data-v-67daa57f]{z-index:3;width:100%;height:100%;cursor:pointer;overflow:hidden}span[data-v-f547d5c6]{font-weight:bolder}.text[data-v-f547d5c6]{margin-top:20px}.line[data-v-f547d5c6]{border-bottom:1px solid #dcdfe6;margin:20px 0}.center[data-v-f547d5c6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.center .cen span[data-v-f547d5c6],.center .top span[data-v-f547d5c6]{color:"#53a8ff";display:inline-block;width:30px;height:30px;text-align:center;line-height:30px;border:1px solid;padding:5px;margin-bottom:10px;background-color:#e9f3ff}.center .cen span[data-v-f547d5c6]{margin:10px}.button[data-v-f547d5c6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:end;margin-top:20px}@font-face{font-family:iconfont;src:url(//at.alicdn.com/t/font_3226805_qqvo3ag3r8.woff2?t=1646635700216) format("woff2"),url(//at.alicdn.com/t/font_3226805_qqvo3ag3r8.woff?t=1646635700216) format("woff"),url(//at.alicdn.com/t/font_3226805_qqvo3ag3r8.ttf?t=1646635700216) format("truetype")}.iconfont[data-v-f547d5c6]{font-family:iconfont!important;font-size:50px;font-style:normal;color:"#53a8ff";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-shubiao[data-v-f547d5c6]:before{content:""}.main_body[data-v-4b17bce0]{position:relative;width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.classification_title[data-v-4b17bce0]{margin:0 0 10px 0;color:#fff;font-size:14px;cursor:default}.toolbar[data-v-4b17bce0]{z-index:10;position:absolute;width:520px;padding:8px 16px;border-radius:6px;-webkit-box-shadow:0 2px 10px 0 rgba(6,29,44,.25);box-shadow:0 2px 10px 0 rgba(6,29,44,.25);background-color:#fff;top:10px;left:50%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translateX(-50%);transform:translateX(-50%);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.icon_toolbar[data-v-4b17bce0],.text_toolbar[data-v-4b17bce0]{float:left;width:32px;height:32px;padding:0!important;background-repeat:no-repeat;background-size:24px;background-position:50%}.icon_active[data-v-4b17bce0],.icon_toolbar[data-v-4b17bce0]:hover,.text_toolbar[data-v-4b17bce0]:hover{background-color:#eee}[data-v-4b17bce0].icon_color .el-color-picker__trigger{height:24px;margin-top:4px;width:24px!important}[data-v-4b17bce0].el-color-picker--medium,[data-v-4b17bce0].el-color-picker--medium .el-color-picker__trigger{width:24px!important;height:24px!important}.canvas_container[data-v-4b17bce0]{position:relative;width:100%;height:100%;overflow:auto;-webkit-box-sizing:border-box;box-sizing:border-box}.canvas_container canvas[data-v-4b17bce0]{position:absolute;left:0}.canvas_container #ctx_front[data-v-4b17bce0]{z-index:5;background-color:transparent}.canvas_container #ctx_back[data-v-4b17bce0]{z-index:3}.canvas_container #ctx_base[data-v-4b17bce0]{z-index:1}#text[data-v-4b17bce0]{position:absolute;z-index:-1;resize:none;outline:none;border:1px dashed #9c9c9c;overflow:hidden;background:transparent;line-height:30px;display:none}#text[data-v-4b17bce0]:hover{border:1px dashed #53a8ff}#svg-component[data-v-2572c0e2],#svg-tigger[data-v-2572c0e2]{cursor:pointer;height:100%;width:100%;position:relative}#toolbar-show[data-v-2572c0e2]{z-index:20;position:absolute;width:100%;height:100%;top:0;left:0;overflow:hidden;background:#fff}
|
package/package.json
CHANGED
|
@@ -197,7 +197,7 @@ export default {
|
|
|
197
197
|
this.konvaStage.position({ x: x, y: y });
|
|
198
198
|
this.konvaStage.scale({ x: scale, y: scale });
|
|
199
199
|
|
|
200
|
-
this.konvaStage.batchDraw();
|
|
200
|
+
// this.konvaStage.batchDraw();
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
203
|
calculateScaleAndPosition(contentBounds, stageWidth, stageHeight, padding = 0.1) {
|
|
@@ -260,12 +260,14 @@ export default {
|
|
|
260
260
|
},
|
|
261
261
|
updateBounds1(v) {
|
|
262
262
|
if (this.bounds1 === null) {
|
|
263
|
-
this.bounds1 = { minX: v.x, maxX: v.x, minY: v.y, maxY: v.y }
|
|
263
|
+
this.bounds1 = { minX: v.x, maxX: v.x, minY: v.y, maxY: v.y }
|
|
264
264
|
} else {
|
|
265
265
|
if (v.x < this.bounds1.minX) {
|
|
266
266
|
this.bounds1.minX = v.x;
|
|
267
|
+
|
|
267
268
|
} else if (v.x > this.bounds1.maxX) {
|
|
268
269
|
this.bounds1.maxX = v.x;
|
|
270
|
+
|
|
269
271
|
}
|
|
270
272
|
if (v.y < this.bounds1.minY) {
|
|
271
273
|
this.bounds1.minY = v.y;
|
|
@@ -276,20 +278,103 @@ export default {
|
|
|
276
278
|
},
|
|
277
279
|
//思路是计算居中包围盒,然后排除脏数据。
|
|
278
280
|
loadDxf(data) {
|
|
279
|
-
let _this = this;
|
|
280
281
|
this.bounds = null;
|
|
281
282
|
this.konvaLayer.destroyChildren();
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
// 在这里处理数据为空的时候
|
|
285
|
-
if (dxf.entities.length === 0) {
|
|
283
|
+
let flag = this.formatDrawData(data, 'updateBounds')
|
|
284
|
+
if (!flag) {
|
|
286
285
|
this.$emit('error', {
|
|
287
286
|
type: 'entityEmpty'
|
|
288
287
|
})
|
|
289
288
|
return
|
|
290
289
|
}
|
|
290
|
+
|
|
291
|
+
//缩放视口
|
|
292
|
+
let scale = 1;
|
|
293
|
+
const boundingRect = this.konvaLayer.getClientRect();
|
|
294
|
+
let ratio = Number((this.$refs.svgDraw?.clientWidth / boundingRect.width).toFixed(1));
|
|
295
|
+
if (ratio > 2) {
|
|
296
|
+
scale = Number((boundingRect.width / boundingRect.height).toFixed(1));
|
|
297
|
+
scale = scale < 2 ? 2 : scale;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const boundingScale = this.konvaLayer.getClientRect();
|
|
301
|
+
//平移视口
|
|
302
|
+
const x =
|
|
303
|
+
this.$refs.svgDraw?.clientWidth / 2 -
|
|
304
|
+
(Math.ceil(boundingScale.width) / 2 + boundingScale.x / 2);
|
|
305
|
+
const y =
|
|
306
|
+
this.$refs.svgDraw.clientHeight / 2 -
|
|
307
|
+
(Math.ceil(boundingScale.height) / 2 + boundingScale.y);
|
|
308
|
+
|
|
309
|
+
// this.konvaStage.scale({
|
|
310
|
+
// x: 2,
|
|
311
|
+
// y: 2,
|
|
312
|
+
// });
|
|
313
|
+
// this.konvaStage.setX(0);
|
|
314
|
+
// this.konvaStage.setY(750); // 750
|
|
315
|
+
|
|
316
|
+
// this.activedSvgPan.zoom.x = 0;
|
|
317
|
+
// this.activedSvgPan.zoom.y = 750;
|
|
318
|
+
// this.activedSvgPan.x = x;
|
|
319
|
+
// this.activedSvgPan.y = x;
|
|
320
|
+
setTimeout(() => {
|
|
321
|
+
this.centerDraw();
|
|
322
|
+
this.$emit('loaded');
|
|
323
|
+
}, 100);
|
|
324
|
+
},
|
|
325
|
+
toPdf(name) {
|
|
326
|
+
//this.konvaStage.scale({
|
|
327
|
+
//x: this.activedSvgPan.zoom.x,
|
|
328
|
+
//y: this.activedSvgPan.zoom.y,
|
|
329
|
+
//});
|
|
330
|
+
//this.konvaStage.setX(this.activedSvgPan.x);
|
|
331
|
+
//this.konvaStage.setY(this.activedSvgPan.y);
|
|
332
|
+
// get data URL with default settings
|
|
333
|
+
|
|
334
|
+
// open in new window
|
|
335
|
+
this.konvaLayer.getCanvas().setPixelRatio(2);
|
|
336
|
+
const jpegURL = this.konvaStage.toDataURL({
|
|
337
|
+
mimeType: 'image/jpeg',
|
|
338
|
+
quality: 1,
|
|
339
|
+
pixelRatio: 2,
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
let pageData = this.konvaLayer.canvas.toDataURL('image/jpeg', 2);
|
|
343
|
+
|
|
344
|
+
let img = new Image();
|
|
345
|
+
img.src = jpegURL;
|
|
346
|
+
const pdf = new jsPDF('l', 'px', [this.konvaStage.width(), this.konvaStage.height()]);
|
|
347
|
+
|
|
348
|
+
pdf.addImage(
|
|
349
|
+
this.konvaStage.toDataURL({ pixelRatio: 2 }),
|
|
350
|
+
0,
|
|
351
|
+
0,
|
|
352
|
+
this.konvaStage.width(),
|
|
353
|
+
this.konvaStage.height()
|
|
354
|
+
);
|
|
355
|
+
|
|
356
|
+
pdf.save(name + '.pdf');
|
|
357
|
+
// var imgData = canvas.toDataURL('image/png');
|
|
358
|
+
//doc.text("Hello world!", 10, 10);
|
|
359
|
+
//doc.save("a4.pdf");
|
|
360
|
+
},
|
|
361
|
+
// 处理图纸数据
|
|
362
|
+
formatDrawData(data, fn) {
|
|
363
|
+
let _this = this;
|
|
291
364
|
const parser2 = new DxfParser2();
|
|
292
365
|
let dxf2 = parser2.parseSync(data);
|
|
366
|
+
// const parser = new DxfParser();
|
|
367
|
+
// let dxf = parser.parse(data);
|
|
368
|
+
// 在这里处理数据为空的时候
|
|
369
|
+
// if (dxf.entities.length === 0) {
|
|
370
|
+
// this.$emit('error', {
|
|
371
|
+
// type: 'entityEmpty'
|
|
372
|
+
// })
|
|
373
|
+
// return
|
|
374
|
+
// }
|
|
375
|
+
if (dxf2.entities.length === 0) {
|
|
376
|
+
return false
|
|
377
|
+
}
|
|
293
378
|
let hatchEntitys = dxf2.entities.filter(item => item.type === 'HATCH');
|
|
294
379
|
// 处理HATCH部分
|
|
295
380
|
for (let i = 0; i < hatchEntitys.length; i++) {
|
|
@@ -425,7 +510,7 @@ export default {
|
|
|
425
510
|
// }
|
|
426
511
|
}
|
|
427
512
|
//加载图纸
|
|
428
|
-
let entities = formatEntity(
|
|
513
|
+
let entities = formatEntity(dxf2.entities);
|
|
429
514
|
for (let key in entities) {
|
|
430
515
|
if (entities[key]) {
|
|
431
516
|
let group = [];
|
|
@@ -437,13 +522,13 @@ export default {
|
|
|
437
522
|
let type = entities[key][i].type;
|
|
438
523
|
handleFn(
|
|
439
524
|
type,
|
|
440
|
-
|
|
525
|
+
dxf2,
|
|
441
526
|
entities[key][i],
|
|
442
527
|
group,
|
|
443
528
|
key,
|
|
444
529
|
configParams,
|
|
445
530
|
this.konvaLayer,
|
|
446
|
-
|
|
531
|
+
dxf2.tables.lineType.lineTypes
|
|
447
532
|
// this.recordLayerConfig
|
|
448
533
|
);
|
|
449
534
|
}
|
|
@@ -456,9 +541,6 @@ export default {
|
|
|
456
541
|
}
|
|
457
542
|
let shapeGroup = group.filter(item => item.type !== 'text')
|
|
458
543
|
if (shapeGroup.length > 0) {
|
|
459
|
-
// if (group[0]?.stroke) {
|
|
460
|
-
// group[0].stroke = '#000';
|
|
461
|
-
// }
|
|
462
544
|
// 根据颜色分组
|
|
463
545
|
let colorGroup = _.groupBy(shapeGroup, 'stroke');
|
|
464
546
|
for (const colorKey in colorGroup) {
|
|
@@ -492,8 +574,8 @@ export default {
|
|
|
492
574
|
let v2 = {};
|
|
493
575
|
v2.x = x2;
|
|
494
576
|
v2.y = y2;
|
|
495
|
-
_this
|
|
496
|
-
_this
|
|
577
|
+
_this[fn](v1);
|
|
578
|
+
_this[fn](v2);
|
|
497
579
|
}
|
|
498
580
|
if (entity.type === 'polyline') {
|
|
499
581
|
context.strokeStyle = entity.stroke;
|
|
@@ -512,7 +594,7 @@ export default {
|
|
|
512
594
|
let point = {};
|
|
513
595
|
point.x = x;
|
|
514
596
|
point.y = y;
|
|
515
|
-
_this
|
|
597
|
+
_this[fn](point);
|
|
516
598
|
|
|
517
599
|
if (j === 0) {
|
|
518
600
|
context.moveTo(x, y);
|
|
@@ -537,269 +619,43 @@ export default {
|
|
|
537
619
|
},
|
|
538
620
|
shapeType: 'shape',
|
|
539
621
|
});
|
|
540
|
-
if (this.konvaLayer)
|
|
622
|
+
if (this.konvaLayer) {
|
|
623
|
+
this.konvaLayer.add(customShape);
|
|
624
|
+
// 直接在这里调用draw 能拿到最新数据 不执行的话 就会导致最后执行 导致bounds的数据出错
|
|
625
|
+
this.konvaLayer.draw()
|
|
626
|
+
};
|
|
541
627
|
}
|
|
542
|
-
|
|
543
628
|
}
|
|
544
629
|
|
|
545
630
|
}
|
|
546
631
|
}
|
|
547
|
-
|
|
548
|
-
let scale = 1;
|
|
549
|
-
const boundingRect = this.konvaLayer.getClientRect();
|
|
550
|
-
let ratio = Number((this.$refs.svgDraw?.clientWidth / boundingRect.width).toFixed(1));
|
|
551
|
-
if (ratio > 2) {
|
|
552
|
-
scale = Number((boundingRect.width / boundingRect.height).toFixed(1));
|
|
553
|
-
scale = scale < 2 ? 2 : scale;
|
|
554
|
-
}
|
|
555
|
-
// this.konvaStage.scale({
|
|
556
|
-
// x: scale,
|
|
557
|
-
// y: scale,
|
|
558
|
-
//})
|
|
559
|
-
const boundingScale = this.konvaLayer.getClientRect();
|
|
560
|
-
//平移视口
|
|
561
|
-
const x =
|
|
562
|
-
this.$refs.svgDraw?.clientWidth / 2 -
|
|
563
|
-
(Math.ceil(boundingScale.width) / 2 + boundingScale.x / 2);
|
|
564
|
-
const y =
|
|
565
|
-
this.$refs.svgDraw.clientHeight / 2 -
|
|
566
|
-
(Math.ceil(boundingScale.height) / 2 + boundingScale.y);
|
|
567
|
-
|
|
568
|
-
// this.konvaStage.scale({
|
|
569
|
-
// x: 2,
|
|
570
|
-
// y: 2,
|
|
571
|
-
// });
|
|
572
|
-
// this.konvaStage.setX(0);
|
|
573
|
-
// this.konvaStage.setY(750); // 750
|
|
574
|
-
|
|
575
|
-
// this.activedSvgPan.zoom.x = 0;
|
|
576
|
-
// this.activedSvgPan.zoom.y = 750;
|
|
577
|
-
// this.activedSvgPan.x = x;
|
|
578
|
-
// this.activedSvgPan.y = x;
|
|
579
|
-
setTimeout(() => {
|
|
580
|
-
this.centerDraw();
|
|
581
|
-
this.$emit('loaded');
|
|
582
|
-
}, 100);
|
|
583
|
-
},
|
|
584
|
-
toPdf(name) {
|
|
585
|
-
//this.konvaStage.scale({
|
|
586
|
-
//x: this.activedSvgPan.zoom.x,
|
|
587
|
-
//y: this.activedSvgPan.zoom.y,
|
|
588
|
-
//});
|
|
589
|
-
//this.konvaStage.setX(this.activedSvgPan.x);
|
|
590
|
-
//this.konvaStage.setY(this.activedSvgPan.y);
|
|
591
|
-
// get data URL with default settings
|
|
592
|
-
|
|
593
|
-
// open in new window
|
|
594
|
-
this.konvaLayer.getCanvas().setPixelRatio(2);
|
|
595
|
-
const jpegURL = this.konvaStage.toDataURL({
|
|
596
|
-
mimeType: 'image/jpeg',
|
|
597
|
-
quality: 1,
|
|
598
|
-
pixelRatio: 2,
|
|
599
|
-
});
|
|
600
|
-
|
|
601
|
-
let pageData = this.konvaLayer.canvas.toDataURL('image/jpeg', 2);
|
|
602
|
-
|
|
603
|
-
let img = new Image();
|
|
604
|
-
img.src = jpegURL;
|
|
605
|
-
const pdf = new jsPDF('l', 'px', [this.konvaStage.width(), this.konvaStage.height()]);
|
|
606
|
-
|
|
607
|
-
pdf.addImage(
|
|
608
|
-
this.konvaStage.toDataURL({ pixelRatio: 2 }),
|
|
609
|
-
0,
|
|
610
|
-
0,
|
|
611
|
-
this.konvaStage.width(),
|
|
612
|
-
this.konvaStage.height()
|
|
613
|
-
);
|
|
614
|
-
|
|
615
|
-
pdf.save(name + '.pdf');
|
|
616
|
-
// var imgData = canvas.toDataURL('image/png');
|
|
617
|
-
//doc.text("Hello world!", 10, 10);
|
|
618
|
-
//doc.save("a4.pdf");
|
|
632
|
+
return true
|
|
619
633
|
},
|
|
620
634
|
toPdfs(list) {
|
|
621
|
-
|
|
622
|
-
return new Promise((resolve, reject) => {
|
|
635
|
+
return new Promise( (resolve, reject) => {
|
|
623
636
|
const pdf = new jsPDF('l', 'px', [this.konvaStage.width(), this.konvaStage.height()]);
|
|
624
637
|
const exportPixelRatio = 2; // 可以 2/3/4 自己调
|
|
625
638
|
let index = 0;
|
|
626
|
-
|
|
627
|
-
|
|
639
|
+
let length = list.length;
|
|
640
|
+
do {
|
|
641
|
+
let data = list[index];
|
|
628
642
|
//先绘制图面
|
|
643
|
+
|
|
629
644
|
this.konvaLayer.destroyChildren();
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
if (
|
|
633
|
-
let entities = formatEntity(dxf.entities);
|
|
634
|
-
let layers = dxf.tables.layer.layers;
|
|
635
|
-
//先计算包围
|
|
636
|
-
for (let key in entities) {
|
|
637
|
-
if (entities[key]) {
|
|
638
|
-
let group = [];
|
|
639
|
-
let l = entities[key].length;
|
|
640
|
-
let layerConfig = this.recordLayerConfig[key];
|
|
641
|
-
let configParams =
|
|
642
|
-
layerConfig && Object.keys(layerConfig).length > 0 ? layerConfig : null;
|
|
643
|
-
for (let i = 0; i < l; i++) {
|
|
644
|
-
let type = entities[key][i].type;
|
|
645
|
-
handleFn(
|
|
646
|
-
type,
|
|
647
|
-
dxf,
|
|
648
|
-
entities[key][i],
|
|
649
|
-
group,
|
|
650
|
-
key,
|
|
651
|
-
configParams,
|
|
652
|
-
this.konvaLayer,
|
|
653
|
-
this.recordLayerConfig
|
|
654
|
-
);
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
for (let i = 0; i < group.length; i++) {
|
|
658
|
-
let entity = group[i];
|
|
659
|
-
if (entity.type === 'line') {
|
|
660
|
-
let x1 = entity.x1;
|
|
661
|
-
let y1 = entity.y1;
|
|
662
|
-
let x2 = entity.x2;
|
|
663
|
-
let y2 = entity.y2;
|
|
664
|
-
let v1 = {};
|
|
665
|
-
v1.x = x1;
|
|
666
|
-
v1.y = y1;
|
|
667
|
-
let v2 = {};
|
|
668
|
-
v2.x = x2;
|
|
669
|
-
v2.y = y2;
|
|
670
|
-
_this.updateBounds1(v1);
|
|
671
|
-
_this.updateBounds1(v2);
|
|
672
|
-
}
|
|
673
|
-
if (entity.type === 'polyline') {
|
|
674
|
-
let flag = false;
|
|
675
|
-
let points = entity.points;
|
|
676
|
-
let closed = entity.closed;
|
|
677
|
-
|
|
678
|
-
for (let j = 0; j < points.length; j++) {
|
|
679
|
-
let index = j % 2;
|
|
680
|
-
if (index === 0) {
|
|
681
|
-
let x = points[j];
|
|
682
|
-
let y = points[j + 1];
|
|
683
|
-
let point = {};
|
|
684
|
-
point.x = x;
|
|
685
|
-
point.y = y;
|
|
686
|
-
_this.updateBounds1(point);
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
for (let key in entities) {
|
|
695
|
-
if (entities[key]) {
|
|
696
|
-
let group = [];
|
|
697
|
-
let l = entities[key].length;
|
|
698
|
-
let layerConfig = this.recordLayerConfig[key];
|
|
699
|
-
let configParams =
|
|
700
|
-
layerConfig && Object.keys(layerConfig).length > 0 ? layerConfig : null;
|
|
701
|
-
for (let i = 0; i < l; i++) {
|
|
702
|
-
let type = entities[key][i].type;
|
|
703
|
-
handleFn(
|
|
704
|
-
type,
|
|
705
|
-
dxf,
|
|
706
|
-
entities[key][i],
|
|
707
|
-
group,
|
|
708
|
-
key,
|
|
709
|
-
configParams,
|
|
710
|
-
this.konvaLayer,
|
|
711
|
-
this.recordLayerConfig
|
|
712
|
-
);
|
|
713
|
-
}
|
|
714
|
-
if (!this.konvaLayer) return;
|
|
715
|
-
for (let i = 0; i < group.length; i++) {
|
|
716
|
-
let entity = group[i];
|
|
717
|
-
if (entity.type === 'text') {
|
|
718
|
-
if (this.konvaLayer) this.konvaLayer.add(entity.obj);
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
if (group.length > 0) {
|
|
723
|
-
if (group[0]?.stroke) {
|
|
724
|
-
group[0].stroke = '#000';
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
let customShape = new Konva.Shape({
|
|
728
|
-
x: 0,
|
|
729
|
-
y: 0,
|
|
730
|
-
strokeWidth: 0.2,
|
|
731
|
-
name: key.replace(/\s*/g, ''),
|
|
732
|
-
entityId: key,
|
|
733
|
-
stroke: group[0].stroke,
|
|
734
|
-
customColor: configParams ? configParams.color : '',
|
|
735
|
-
//visible: configParams ? configParams.visible :true,
|
|
736
|
-
sceneFunc(context, shape) {
|
|
737
|
-
context.beginPath();
|
|
738
|
-
for (let i = 0; i < group.length; i++) {
|
|
739
|
-
let entity = group[i];
|
|
740
|
-
|
|
741
|
-
if (entity.type === 'line') {
|
|
742
|
-
context.strokeStyle = entity.stroke;
|
|
743
|
-
let x1 = entity.x1;
|
|
744
|
-
let y1 = entity.y1;
|
|
745
|
-
let x2 = entity.x2;
|
|
746
|
-
let y2 = entity.y2;
|
|
747
|
-
if (x1 != undefined && y1 != undefined && x2 != undefined && y2 != undefined) {
|
|
748
|
-
context.moveTo(x1, -parseFloat(y1));
|
|
749
|
-
context.lineTo(x2, -parseFloat(y2));
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
if (entity.type === 'polyline') {
|
|
753
|
-
context.strokeStyle = entity.stroke;
|
|
754
|
-
|
|
755
|
-
let flag = false;
|
|
756
|
-
|
|
757
|
-
let points = entity.points;
|
|
758
|
-
let closed = entity.closed;
|
|
759
|
-
|
|
760
|
-
for (let j = 0; j < points.length; j++) {
|
|
761
|
-
let index = j % 2;
|
|
762
|
-
if (index === 0) {
|
|
763
|
-
let x = points[j];
|
|
764
|
-
let y = points[j + 1];
|
|
765
|
-
|
|
766
|
-
if (j === 0) {
|
|
767
|
-
context.moveTo(x, y);
|
|
768
|
-
} else {
|
|
769
|
-
context.lineTo(x, y);
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
if (closed) {
|
|
774
|
-
if (j === points.length - 1) {
|
|
775
|
-
context.lineTo(points[0], points[1]);
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
// context.closePath();
|
|
782
|
-
context.fillStrokeShape(shape);
|
|
783
|
-
},
|
|
784
|
-
});
|
|
785
|
-
if (this.konvaLayer) this.konvaLayer.add(customShape);
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
|
|
645
|
+
let flag = this.formatDrawData(data, 'updateBounds1')
|
|
646
|
+
// 这步还没执行完就执行下面的代码了
|
|
647
|
+
if (flag) {
|
|
790
648
|
const { scale, x, y } = this.calculateScaleAndPosition(
|
|
791
|
-
|
|
649
|
+
this.bounds1,
|
|
792
650
|
this.konvaStage.width(),
|
|
793
651
|
this.konvaStage.height(),
|
|
794
652
|
0.05 // 5% 边距
|
|
795
653
|
);
|
|
796
|
-
|
|
797
|
-
_this.bounds1 = null;
|
|
798
|
-
|
|
654
|
+
this.bounds1 = null;
|
|
799
655
|
this.konvaStage.position({ x: x, y: y });
|
|
800
656
|
this.konvaStage.scale({ x: scale, y: scale });
|
|
801
657
|
|
|
802
|
-
this.konvaStage.batchDraw();
|
|
658
|
+
// this.konvaStage.batchDraw();
|
|
803
659
|
//添加成功移动视口位置 pageIdx === 0
|
|
804
660
|
|
|
805
661
|
if (index === 0) {
|
|
@@ -822,8 +678,49 @@ export default {
|
|
|
822
678
|
}
|
|
823
679
|
index++
|
|
824
680
|
}
|
|
681
|
+
} while (index < length)
|
|
682
|
+
// for (let pageIdx = 0; pageIdx < list.length; pageIdx++) {
|
|
683
|
+
// let data = list[pageIdx];
|
|
684
|
+
// //先绘制图面
|
|
685
|
+
// this.bounds1 = null;
|
|
686
|
+
// this.konvaLayer.destroyChildren();
|
|
687
|
+
// let flag = this.formatDrawData(data, 'updateBounds1')
|
|
688
|
+
// // 这步还没执行完就执行下面的代码了
|
|
689
|
+
// if (flag) {
|
|
690
|
+
// const { scale, x, y } = this.calculateScaleAndPosition(
|
|
691
|
+
// this.bounds1,
|
|
692
|
+
// this.konvaStage.width(),
|
|
693
|
+
// this.konvaStage.height(),
|
|
694
|
+
// 0.05 // 5% 边距
|
|
695
|
+
// );
|
|
696
|
+
// this.konvaStage.position({ x: x, y: y });
|
|
697
|
+
// this.konvaStage.scale({ x: scale, y: scale });
|
|
698
|
+
|
|
699
|
+
// this.konvaStage.batchDraw();
|
|
700
|
+
// //添加成功移动视口位置 pageIdx === 0
|
|
701
|
+
|
|
702
|
+
// if (index === 0) {
|
|
703
|
+
// pdf.addImage(
|
|
704
|
+
// this.konvaStage.toDataURL({ pixelRatio: 2 }),
|
|
705
|
+
// 0,
|
|
706
|
+
// 0,
|
|
707
|
+
// this.konvaStage.width(),
|
|
708
|
+
// this.konvaStage.height()
|
|
709
|
+
// );
|
|
710
|
+
// } else {
|
|
711
|
+
// pdf.addPage();
|
|
712
|
+
// pdf.addImage(
|
|
713
|
+
// this.konvaStage.toDataURL({ pixelRatio: 2 }),
|
|
714
|
+
// 0,
|
|
715
|
+
// 0,
|
|
716
|
+
// this.konvaStage.width(),
|
|
717
|
+
// this.konvaStage.height()
|
|
718
|
+
// );
|
|
719
|
+
// }
|
|
720
|
+
// index++
|
|
721
|
+
// }
|
|
825
722
|
|
|
826
|
-
}
|
|
723
|
+
// }
|
|
827
724
|
if (index > 0) {
|
|
828
725
|
pdf.save('批量导出.pdf');
|
|
829
726
|
resolve()
|