fl-web-component 2.1.1-beta.6 → 2.1.1-beta.9
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.
- package/dist/fl-web-component.common.js +279 -260
- package/dist/fl-web-component.common.js.map +1 -1
- package/dist/fl-web-component.css +1 -1
- package/package.json +1 -1
- package/packages/components/com-flcanvas/components/entityFormatting.js +3 -1
- package/packages/components/com-flcanvas/index.vue +263 -247
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.fl-model-containor[data-v-7f8842df]{width:100%;height:100%;position:relative;cursor:pointer}[data-v-7f8842df] .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-7f8842df] .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-7f8842df] .circle-tag{width:10px;height:10px;margin-top:5px;border-radius:50%;background-color:#ff5000}[data-v-7f8842df] .measure-label-font{word-break:break-all}[data-v-7f8842df] .mark-label-img{padding-top:5px;width:20px;height:20px}.loading-overlay[data-v-7f8842df]{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-7f8842df]{opacity:1;visibility:visible}.loading-content[data-v-7f8842df]{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-7f8842df]{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #409eff;border-radius:50%;-webkit-animation:spin-7f8842df 1s linear infinite;animation:spin-7f8842df 1s linear infinite;margin:0 auto 20px}@-webkit-keyframes spin-7f8842df{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin-7f8842df{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.loading-text[data-v-7f8842df]{font-size:16px;font-weight:500;color:#333;margin-bottom:20px}.loading-this.progress-bar[data-v-7f8842df]{width:100%;height:8px;background-color:#f0f0f0;border-radius:4px;overflow:hidden;margin-bottom:15px}.loading-this.progress-fill[data-v-7f8842df]{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-7f8842df]{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-cb260cfc]{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-7f8842df]{width:100%;height:100%;position:relative;cursor:pointer}[data-v-7f8842df] .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-7f8842df] .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-7f8842df] .circle-tag{width:10px;height:10px;margin-top:5px;border-radius:50%;background-color:#ff5000}[data-v-7f8842df] .measure-label-font{word-break:break-all}[data-v-7f8842df] .mark-label-img{padding-top:5px;width:20px;height:20px}.loading-overlay[data-v-7f8842df]{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-7f8842df]{opacity:1;visibility:visible}.loading-content[data-v-7f8842df]{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-7f8842df]{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #409eff;border-radius:50%;-webkit-animation:spin-7f8842df 1s linear infinite;animation:spin-7f8842df 1s linear infinite;margin:0 auto 20px}@-webkit-keyframes spin-7f8842df{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin-7f8842df{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.loading-text[data-v-7f8842df]{font-size:16px;font-weight:500;color:#333;margin-bottom:20px}.loading-this.progress-bar[data-v-7f8842df]{width:100%;height:8px;background-color:#f0f0f0;border-radius:4px;overflow:hidden;margin-bottom:15px}.loading-this.progress-fill[data-v-7f8842df]{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-7f8842df]{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-41b98e1a]{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,9 +197,11 @@ function mtextContentAndFormattingToTextAndStyle(textAndControlChars, entity, co
|
|
|
197
197
|
function drawArc(recordDxf, entity, group, key, configParams) {
|
|
198
198
|
let color = entity.color;
|
|
199
199
|
let rgb = decimalToRGBHex(color);
|
|
200
|
-
|
|
201
200
|
let hex = rgb.hex;
|
|
202
201
|
let startAngle, endAngle;
|
|
202
|
+
if (hex == '#FFFFFF') {
|
|
203
|
+
hex = '#000';
|
|
204
|
+
}
|
|
203
205
|
if (entity.type === 'CIRCLE') {
|
|
204
206
|
startAngle = entity.startAngle || 0;
|
|
205
207
|
endAngle = startAngle + 2 * Math.PI;
|
|
@@ -281,7 +281,7 @@ export default {
|
|
|
281
281
|
nodes[i].destroy();
|
|
282
282
|
}
|
|
283
283
|
}*/
|
|
284
|
-
|
|
284
|
+
this.bounds = null;
|
|
285
285
|
this.konvaLayer.destroyChildren();
|
|
286
286
|
const parser = new DxfParser();
|
|
287
287
|
let dxf = parser.parse(data);
|
|
@@ -443,83 +443,85 @@ export default {
|
|
|
443
443
|
if (this.konvaLayer) this.konvaLayer.add(entity.obj);
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
+
if (group.length > 0) {
|
|
447
|
+
if (group[0]?.stroke) {
|
|
448
|
+
group[0].stroke = '#000';
|
|
449
|
+
}
|
|
450
|
+
let customShape = new Konva.Shape({
|
|
451
|
+
x: 0,
|
|
452
|
+
y: 0,
|
|
453
|
+
strokeWidth: 0.2,
|
|
454
|
+
name: key.replace(/\s*/g, ''),
|
|
455
|
+
entityId: key,
|
|
456
|
+
stroke: group[0].stroke,
|
|
457
|
+
customColor: configParams ? configParams.color : group[0].stroke,
|
|
458
|
+
//visible: configParams ? configParams.visible :true,
|
|
459
|
+
sceneFunc(context, shape) {
|
|
460
|
+
context.beginPath();
|
|
461
|
+
for (let i = 0; i < group.length; i++) {
|
|
462
|
+
let entity = group[i];
|
|
446
463
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
context.strokeStyle = entity.stroke;
|
|
466
|
-
let x1 = entity.x1;
|
|
467
|
-
let y1 = entity.y1;
|
|
468
|
-
let x2 = entity.x2;
|
|
469
|
-
let y2 = entity.y2;
|
|
470
|
-
if (x1 != undefined && y1 != undefined && x2 != undefined && y2 != undefined) {
|
|
471
|
-
context.moveTo(x1, -parseFloat(y1));
|
|
472
|
-
context.lineTo(x2, -parseFloat(y2));
|
|
464
|
+
if (entity.type === 'line') {
|
|
465
|
+
context.strokeStyle = entity.stroke;
|
|
466
|
+
let x1 = entity.x1;
|
|
467
|
+
let y1 = entity.y1;
|
|
468
|
+
let x2 = entity.x2;
|
|
469
|
+
let y2 = entity.y2;
|
|
470
|
+
if (x1 != undefined && y1 != undefined && x2 != undefined && y2 != undefined) {
|
|
471
|
+
context.moveTo(x1, -parseFloat(y1));
|
|
472
|
+
context.lineTo(x2, -parseFloat(y2));
|
|
473
|
+
}
|
|
474
|
+
let v1 = {};
|
|
475
|
+
v1.x = x1;
|
|
476
|
+
v1.y = y1;
|
|
477
|
+
let v2 = {};
|
|
478
|
+
v2.x = x2;
|
|
479
|
+
v2.y = y2;
|
|
480
|
+
_this.updateBounds(v1);
|
|
481
|
+
_this.updateBounds(v2);
|
|
473
482
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
v1.y = y1;
|
|
477
|
-
let v2 = {};
|
|
478
|
-
v2.x = x2;
|
|
479
|
-
v2.y = y2;
|
|
480
|
-
_this.updateBounds(v1);
|
|
481
|
-
_this.updateBounds(v2);
|
|
482
|
-
}
|
|
483
|
-
if (entity.type === 'polyline') {
|
|
484
|
-
context.strokeStyle = entity.stroke;
|
|
483
|
+
if (entity.type === 'polyline') {
|
|
484
|
+
context.strokeStyle = entity.stroke;
|
|
485
485
|
|
|
486
|
-
|
|
486
|
+
let flag = false;
|
|
487
487
|
|
|
488
|
-
|
|
488
|
+
let points = entity.points;
|
|
489
489
|
|
|
490
|
-
|
|
490
|
+
let closed = entity.closed;
|
|
491
491
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
492
|
+
for (let j = 0; j < points.length; j++) {
|
|
493
|
+
let index = j % 2;
|
|
494
|
+
if (index === 0) {
|
|
495
|
+
let x = points[j];
|
|
496
|
+
let y = points[j + 1];
|
|
497
|
+
let point = {};
|
|
498
|
+
point.x = x;
|
|
499
|
+
point.y = y;
|
|
500
|
+
_this.updateBounds(point);
|
|
501
501
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
502
|
+
if (j === 0) {
|
|
503
|
+
context.moveTo(x, y);
|
|
504
|
+
} else {
|
|
505
|
+
context.lineTo(x, y);
|
|
506
|
+
}
|
|
506
507
|
}
|
|
507
|
-
}
|
|
508
508
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
509
|
+
if (closed) {
|
|
510
|
+
if (j === points.length - 1) {
|
|
511
|
+
context.lineTo(points[0], points[1]);
|
|
512
|
+
}
|
|
512
513
|
}
|
|
513
514
|
}
|
|
514
515
|
}
|
|
515
516
|
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
517
|
+
// context.closePath();
|
|
518
|
+
context.fillStrokeShape(shape);
|
|
519
|
+
},
|
|
520
|
+
shapeType: 'shape',
|
|
521
|
+
});
|
|
522
|
+
if (this.konvaLayer) this.konvaLayer.add(customShape);
|
|
523
|
+
}
|
|
524
|
+
|
|
523
525
|
}
|
|
524
526
|
}
|
|
525
527
|
//缩放视口
|
|
@@ -543,17 +545,17 @@ export default {
|
|
|
543
545
|
this.$refs.svgDraw.clientHeight / 2 -
|
|
544
546
|
(Math.ceil(boundingScale.height) / 2 + boundingScale.y);
|
|
545
547
|
|
|
546
|
-
this.konvaStage.scale({
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
});
|
|
550
|
-
this.konvaStage.setX(0);
|
|
551
|
-
this.konvaStage.setY(750); // 750
|
|
552
|
-
|
|
553
|
-
this.activedSvgPan.zoom.x = 0;
|
|
554
|
-
this.activedSvgPan.zoom.y = 750;
|
|
555
|
-
this.activedSvgPan.x = x;
|
|
556
|
-
this.activedSvgPan.y = x;
|
|
548
|
+
// this.konvaStage.scale({
|
|
549
|
+
// x: 2,
|
|
550
|
+
// y: 2,
|
|
551
|
+
// });
|
|
552
|
+
// this.konvaStage.setX(0);
|
|
553
|
+
// this.konvaStage.setY(750); // 750
|
|
554
|
+
|
|
555
|
+
// this.activedSvgPan.zoom.x = 0;
|
|
556
|
+
// this.activedSvgPan.zoom.y = 750;
|
|
557
|
+
// this.activedSvgPan.x = x;
|
|
558
|
+
// this.activedSvgPan.y = x;
|
|
557
559
|
setTimeout(() => {
|
|
558
560
|
this.centerDraw();
|
|
559
561
|
this.$emit('loaded');
|
|
@@ -597,139 +599,59 @@ export default {
|
|
|
597
599
|
},
|
|
598
600
|
toPdfs(list) {
|
|
599
601
|
let _this = this;
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
let
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
for (let i = 0; i < group.length; i++) {
|
|
635
|
-
let entity = group[i];
|
|
636
|
-
if (entity.type === 'line') {
|
|
637
|
-
let x1 = entity.x1;
|
|
638
|
-
let y1 = entity.y1;
|
|
639
|
-
let x2 = entity.x2;
|
|
640
|
-
let y2 = entity.y2;
|
|
641
|
-
let v1 = {};
|
|
642
|
-
v1.x = x1;
|
|
643
|
-
v1.y = y1;
|
|
644
|
-
let v2 = {};
|
|
645
|
-
v2.x = x2;
|
|
646
|
-
v2.y = y2;
|
|
647
|
-
_this.updateBounds1(v1);
|
|
648
|
-
_this.updateBounds1(v2);
|
|
649
|
-
}
|
|
650
|
-
if (entity.type === 'polyline') {
|
|
651
|
-
let flag = false;
|
|
652
|
-
let points = entity.points;
|
|
653
|
-
let closed = entity.closed;
|
|
654
|
-
|
|
655
|
-
for (let j = 0; j < points.length; j++) {
|
|
656
|
-
let index = j % 2;
|
|
657
|
-
if (index === 0) {
|
|
658
|
-
let x = points[j];
|
|
659
|
-
let y = points[j + 1];
|
|
660
|
-
let point = {};
|
|
661
|
-
point.x = x;
|
|
662
|
-
point.y = y;
|
|
663
|
-
_this.updateBounds1(point);
|
|
664
|
-
}
|
|
602
|
+
return new Promise((resolve, reject) => {
|
|
603
|
+
const pdf = new jsPDF('l', 'px', [this.konvaStage.width(), this.konvaStage.height()]);
|
|
604
|
+
const exportPixelRatio = 2; // 可以 2/3/4 自己调
|
|
605
|
+
let index = 0;
|
|
606
|
+
for (let pageIdx = 0; pageIdx < list.length; pageIdx++) {
|
|
607
|
+
let data = list[pageIdx];
|
|
608
|
+
//先绘制图面
|
|
609
|
+
this.konvaLayer.destroyChildren();
|
|
610
|
+
const parser = new DxfParser();
|
|
611
|
+
let dxf = parser.parse(data);
|
|
612
|
+
if (dxf.entities.length > 0) {
|
|
613
|
+
let entities = formatEntity(dxf.entities);
|
|
614
|
+
let layers = dxf.tables.layer.layers;
|
|
615
|
+
//先计算包围
|
|
616
|
+
for (let key in entities) {
|
|
617
|
+
if (entities[key]) {
|
|
618
|
+
let group = [];
|
|
619
|
+
let l = entities[key].length;
|
|
620
|
+
let layerConfig = this.recordLayerConfig[key];
|
|
621
|
+
let configParams =
|
|
622
|
+
layerConfig && Object.keys(layerConfig).length > 0 ? layerConfig : null;
|
|
623
|
+
for (let i = 0; i < l; i++) {
|
|
624
|
+
let type = entities[key][i].type;
|
|
625
|
+
handleFn(
|
|
626
|
+
type,
|
|
627
|
+
dxf,
|
|
628
|
+
entities[key][i],
|
|
629
|
+
group,
|
|
630
|
+
key,
|
|
631
|
+
configParams,
|
|
632
|
+
this.konvaLayer,
|
|
633
|
+
this.recordLayerConfig
|
|
634
|
+
);
|
|
665
635
|
}
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
for (let key in entities) {
|
|
672
|
-
if (entities[key]) {
|
|
673
|
-
let group = [];
|
|
674
|
-
let l = entities[key].length;
|
|
675
|
-
let layerConfig = this.recordLayerConfig[key];
|
|
676
|
-
let configParams =
|
|
677
|
-
layerConfig && Object.keys(layerConfig).length > 0 ? layerConfig : null;
|
|
678
|
-
for (let i = 0; i < l; i++) {
|
|
679
|
-
let type = entities[key][i].type;
|
|
680
|
-
handleFn(
|
|
681
|
-
type,
|
|
682
|
-
dxf,
|
|
683
|
-
entities[key][i],
|
|
684
|
-
group,
|
|
685
|
-
key,
|
|
686
|
-
configParams,
|
|
687
|
-
this.konvaLayer,
|
|
688
|
-
this.recordLayerConfig
|
|
689
|
-
);
|
|
690
|
-
}
|
|
691
|
-
if (!this.konvaLayer) return;
|
|
692
|
-
for (let i = 0; i < group.length; i++) {
|
|
693
|
-
let entity = group[i];
|
|
694
|
-
if (entity.type === 'text') {
|
|
695
|
-
if (this.konvaLayer) this.konvaLayer.add(entity.obj);
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
if (group[0].stroke == undefined) {
|
|
700
|
-
group[0].stroke = '#000';
|
|
701
|
-
}
|
|
702
636
|
|
|
703
|
-
let customShape = new Konva.Shape({
|
|
704
|
-
x: 0,
|
|
705
|
-
y: 0,
|
|
706
|
-
strokeWidth: 0.2,
|
|
707
|
-
name: key.replace(/\s*/g, ''),
|
|
708
|
-
entityId: key,
|
|
709
|
-
stroke: group[0].stroke,
|
|
710
|
-
customColor: configParams ? configParams.color : '',
|
|
711
|
-
//visible: configParams ? configParams.visible :true,
|
|
712
|
-
sceneFunc(context, shape) {
|
|
713
|
-
context.beginPath();
|
|
714
637
|
for (let i = 0; i < group.length; i++) {
|
|
715
638
|
let entity = group[i];
|
|
716
|
-
|
|
717
639
|
if (entity.type === 'line') {
|
|
718
|
-
context.strokeStyle = entity.stroke;
|
|
719
640
|
let x1 = entity.x1;
|
|
720
641
|
let y1 = entity.y1;
|
|
721
642
|
let x2 = entity.x2;
|
|
722
643
|
let y2 = entity.y2;
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
}
|
|
644
|
+
let v1 = {};
|
|
645
|
+
v1.x = x1;
|
|
646
|
+
v1.y = y1;
|
|
647
|
+
let v2 = {};
|
|
648
|
+
v2.x = x2;
|
|
649
|
+
v2.y = y2;
|
|
650
|
+
_this.updateBounds1(v1);
|
|
651
|
+
_this.updateBounds1(v2);
|
|
727
652
|
}
|
|
728
653
|
if (entity.type === 'polyline') {
|
|
729
|
-
context.strokeStyle = entity.stroke;
|
|
730
|
-
|
|
731
654
|
let flag = false;
|
|
732
|
-
|
|
733
655
|
let points = entity.points;
|
|
734
656
|
let closed = entity.closed;
|
|
735
657
|
|
|
@@ -738,65 +660,159 @@ export default {
|
|
|
738
660
|
if (index === 0) {
|
|
739
661
|
let x = points[j];
|
|
740
662
|
let y = points[j + 1];
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
context.lineTo(x, y);
|
|
746
|
-
}
|
|
663
|
+
let point = {};
|
|
664
|
+
point.x = x;
|
|
665
|
+
point.y = y;
|
|
666
|
+
_this.updateBounds1(point);
|
|
747
667
|
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
}
|
|
748
673
|
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
674
|
+
for (let key in entities) {
|
|
675
|
+
if (entities[key]) {
|
|
676
|
+
let group = [];
|
|
677
|
+
let l = entities[key].length;
|
|
678
|
+
let layerConfig = this.recordLayerConfig[key];
|
|
679
|
+
let configParams =
|
|
680
|
+
layerConfig && Object.keys(layerConfig).length > 0 ? layerConfig : null;
|
|
681
|
+
for (let i = 0; i < l; i++) {
|
|
682
|
+
let type = entities[key][i].type;
|
|
683
|
+
handleFn(
|
|
684
|
+
type,
|
|
685
|
+
dxf,
|
|
686
|
+
entities[key][i],
|
|
687
|
+
group,
|
|
688
|
+
key,
|
|
689
|
+
configParams,
|
|
690
|
+
this.konvaLayer,
|
|
691
|
+
this.recordLayerConfig
|
|
692
|
+
);
|
|
693
|
+
}
|
|
694
|
+
if (!this.konvaLayer) return;
|
|
695
|
+
for (let i = 0; i < group.length; i++) {
|
|
696
|
+
let entity = group[i];
|
|
697
|
+
if (entity.type === 'text') {
|
|
698
|
+
if (this.konvaLayer) this.konvaLayer.add(entity.obj);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
if (group.length > 0) {
|
|
703
|
+
if (group[0]?.stroke) {
|
|
704
|
+
group[0].stroke = '#000';
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
let customShape = new Konva.Shape({
|
|
708
|
+
x: 0,
|
|
709
|
+
y: 0,
|
|
710
|
+
strokeWidth: 0.2,
|
|
711
|
+
name: key.replace(/\s*/g, ''),
|
|
712
|
+
entityId: key,
|
|
713
|
+
stroke: group[0].stroke,
|
|
714
|
+
customColor: configParams ? configParams.color : '',
|
|
715
|
+
//visible: configParams ? configParams.visible :true,
|
|
716
|
+
sceneFunc(context, shape) {
|
|
717
|
+
context.beginPath();
|
|
718
|
+
for (let i = 0; i < group.length; i++) {
|
|
719
|
+
let entity = group[i];
|
|
720
|
+
|
|
721
|
+
if (entity.type === 'line') {
|
|
722
|
+
context.strokeStyle = entity.stroke;
|
|
723
|
+
let x1 = entity.x1;
|
|
724
|
+
let y1 = entity.y1;
|
|
725
|
+
let x2 = entity.x2;
|
|
726
|
+
let y2 = entity.y2;
|
|
727
|
+
if (x1 != undefined && y1 != undefined && x2 != undefined && y2 != undefined) {
|
|
728
|
+
context.moveTo(x1, -parseFloat(y1));
|
|
729
|
+
context.lineTo(x2, -parseFloat(y2));
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
if (entity.type === 'polyline') {
|
|
733
|
+
context.strokeStyle = entity.stroke;
|
|
734
|
+
|
|
735
|
+
let flag = false;
|
|
736
|
+
|
|
737
|
+
let points = entity.points;
|
|
738
|
+
let closed = entity.closed;
|
|
739
|
+
|
|
740
|
+
for (let j = 0; j < points.length; j++) {
|
|
741
|
+
let index = j % 2;
|
|
742
|
+
if (index === 0) {
|
|
743
|
+
let x = points[j];
|
|
744
|
+
let y = points[j + 1];
|
|
745
|
+
|
|
746
|
+
if (j === 0) {
|
|
747
|
+
context.moveTo(x, y);
|
|
748
|
+
} else {
|
|
749
|
+
context.lineTo(x, y);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
if (closed) {
|
|
754
|
+
if (j === points.length - 1) {
|
|
755
|
+
context.lineTo(points[0], points[1]);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
752
759
|
}
|
|
753
760
|
}
|
|
754
|
-
|
|
755
|
-
|
|
761
|
+
// context.closePath();
|
|
762
|
+
context.fillStrokeShape(shape);
|
|
763
|
+
},
|
|
764
|
+
});
|
|
765
|
+
if (this.konvaLayer) this.konvaLayer.add(customShape);
|
|
756
766
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
}
|
|
761
|
-
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
const { scale, x, y } = this.calculateScaleAndPosition(
|
|
771
|
+
_this.bounds1,
|
|
772
|
+
this.konvaStage.width(),
|
|
773
|
+
this.konvaStage.height(),
|
|
774
|
+
0.05 // 5% 边距
|
|
775
|
+
);
|
|
776
|
+
|
|
777
|
+
_this.bounds1 = null;
|
|
778
|
+
|
|
779
|
+
this.konvaStage.position({ x: x, y: y });
|
|
780
|
+
this.konvaStage.scale({ x: scale, y: scale });
|
|
781
|
+
|
|
782
|
+
this.konvaStage.batchDraw();
|
|
783
|
+
//添加成功移动视口位置 pageIdx === 0
|
|
784
|
+
|
|
785
|
+
if (index === 0) {
|
|
786
|
+
pdf.addImage(
|
|
787
|
+
this.konvaStage.toDataURL({ pixelRatio: 2 }),
|
|
788
|
+
0,
|
|
789
|
+
0,
|
|
790
|
+
this.konvaStage.width(),
|
|
791
|
+
this.konvaStage.height()
|
|
792
|
+
);
|
|
793
|
+
} else {
|
|
794
|
+
pdf.addPage();
|
|
795
|
+
pdf.addImage(
|
|
796
|
+
this.konvaStage.toDataURL({ pixelRatio: 2 }),
|
|
797
|
+
0,
|
|
798
|
+
0,
|
|
799
|
+
this.konvaStage.width(),
|
|
800
|
+
this.konvaStage.height()
|
|
801
|
+
);
|
|
802
|
+
}
|
|
803
|
+
index++
|
|
762
804
|
}
|
|
763
|
-
}
|
|
764
805
|
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
0.05 // 5% 边距
|
|
770
|
-
);
|
|
771
|
-
|
|
772
|
-
_this.bounds1 = null;
|
|
773
|
-
|
|
774
|
-
this.konvaStage.position({ x: x, y: y });
|
|
775
|
-
this.konvaStage.scale({ x: scale, y: scale });
|
|
776
|
-
|
|
777
|
-
this.konvaStage.batchDraw();
|
|
778
|
-
//添加成功移动视口位置
|
|
779
|
-
|
|
780
|
-
if (pageIdx == 0) {
|
|
781
|
-
pdf.addImage(
|
|
782
|
-
this.konvaStage.toDataURL({ pixelRatio: 2 }),
|
|
783
|
-
0,
|
|
784
|
-
0,
|
|
785
|
-
this.konvaStage.width(),
|
|
786
|
-
this.konvaStage.height()
|
|
787
|
-
);
|
|
806
|
+
}
|
|
807
|
+
if (index > 0) {
|
|
808
|
+
pdf.save('批量导出.pdf');
|
|
809
|
+
resolve()
|
|
788
810
|
} else {
|
|
789
|
-
|
|
790
|
-
pdf.addImage(
|
|
791
|
-
this.konvaStage.toDataURL({ pixelRatio: 2 }),
|
|
792
|
-
0,
|
|
793
|
-
0,
|
|
794
|
-
this.konvaStage.width(),
|
|
795
|
-
this.konvaStage.height()
|
|
796
|
-
);
|
|
811
|
+
reject('解析数据为空, 请检查数据再进行下载')
|
|
797
812
|
}
|
|
798
|
-
}
|
|
799
|
-
|
|
813
|
+
})
|
|
814
|
+
|
|
815
|
+
|
|
800
816
|
|
|
801
817
|
// var imgData = canvas.toDataURL('image/png');
|
|
802
818
|
//doc.text("Hello world!", 10, 10);
|