';
if (pg.blocks && pg.blocks.length > 0) {
- pg.blocks.forEach(blk => { html += this.sbExportBlock(blk); });
+ // 캔버스 높이 계산
+ const maxBottom = Math.max(...pg.blocks.map(b => (b.y || 0) + (b.h || 40)), 400);
+ html += '
';
} else if (pg.wireframeContent) {
@@ -3637,6 +3647,76 @@ function planningCanvas() {
URL.revokeObjectURL(url);
},
+ sbPrintPreview() {
+ // HTML 내보내기와 동일하게 생성 후 새 창에서 인쇄
+ const origExport = this.sbExportHtml.bind(this);
+ let html = '' +
+ (this.sb.docInfo.projectName || 'Storyboard') + ' - 인쇄 ' +
+ '';
+
+ this.sb.pages.forEach((pg, idx) => {
+ html += '';
+ });
+ html += '';
+ }
+ html += '';
+ });
+
+ html += '';
+ const printWin = window.open('', '_blank');
+ printWin.document.write(html);
+ printWin.document.close();
+ printWin.onload = () => { printWin.print(); };
+ },
+
sbExportBlock(blk) {
const esc = (s) => (s || '').replace(//g, '>');
switch (blk.type) {
';
+ pg.blocks.forEach(blk => {
+ html += '
';
} else if (pg.wireframeImage) {
html += '';
+ html += this.sbExportBlock(blk);
+ html += '
';
+ });
+ html += '';
+ html += '
단위업무명
' + (this.sb.docInfo.unitTask || '-') + '
';
+ html += '' + (this.sb.docInfo.unitTask || '-') + '
버전
' + (this.sb.docInfo.version || '-') + '
';
+ html += '' + (this.sb.docInfo.version || '-') + '
Page
' + (idx + 1) + '
';
+ html += '' + (idx + 1) + '
경로
' + (pg.path || '-') + '
';
+ html += '' + (pg.path || '-') + '
화면명
' + (pg.screenName || '-') + '
';
+ html += '' + (pg.screenName || '-') + '
화면 ID
' + (pg.screenId || '-') + '
';
+ html += '' + (pg.screenId || '-') + '
';
+ if (pg.blocks && pg.blocks.length > 0) {
+ const maxBottom = Math.max(...pg.blocks.map(b => (b.y || 0) + (b.h || 40)), 400);
+ html += '
';
+ if (pg.descriptions && pg.descriptions.length > 0) {
+ html += '';
+ pg.blocks.forEach(blk => {
+ html += '
';
+ }
+ html += '';
+ html += this.sbExportBlock(blk);
+ html += '
';
+ });
+ html += 'Description
';
+ pg.descriptions.forEach((d, di) => {
+ html += '' + String(di + 1).padStart(2, '0') + '
';
+ html += '' + (d.text || '').replace(/\n/g, '
') + '
') + '