diff --git a/web/App_Code/DataAccess/StyleDataAccess.cs b/web/App_Code/DataAccess/StyleDataAccess.cs index 2a158d8..3555e09 100644 --- a/web/App_Code/DataAccess/StyleDataAccess.cs +++ b/web/App_Code/DataAccess/StyleDataAccess.cs @@ -225,9 +225,9 @@ public class StyleDataAccess sb.Clear(); sb.Append("insert into TabletStyleDetail(StyleID,Name,Descr,ElementID,StartX,StartY,FontSize,BreakLen,FontFamily,TwoOffset,"); - sb.Append("ThreeOffset,FourOffSet,IsActive,Width,Height,TextWidth,TextHeight,CUser,CDate,CTime,UUser,UDate,UTime) "); + sb.Append("ThreeOffset,FourOffSet,IsActive,Width,Height,TextWidth,TextHeight,TextSpan,CUser,CDate,CTime,UUser,UDate,UTime) "); sb.Append("values (@StyleID,@Name,@Descr,@ElementID,@StartX,@StartY,@FontSize,@BreakLen,@FontFamily,@TwoOffset,"); - sb.Append("@ThreeOffset,@FourOffSet,@IsActive,@Width,@Height,@TextWidth,@TextHeight,@CUser,@CDate,@CTime,@UUser,@UDate,@UTime) "); + sb.Append("@ThreeOffset,@FourOffSet,@IsActive,@Width,@Height,@TextWidth,@TextHeight,@TextSpan,@CUser,@CDate,@CTime,@UUser,@UDate,@UTime) "); foreach (var item in list) { SqlParameter[] sp1 = new SqlParameter[] { @@ -248,6 +248,7 @@ public class StyleDataAccess new SqlParameter("@Height",item.Height), new SqlParameter("@TextWidth",item.TextWidth), new SqlParameter("@TextHeight",item.TextHeight), + new SqlParameter("@TextSpan",item.TextSpan), new SqlParameter("@CUser",""), new SqlParameter("@CDate",""), new SqlParameter("@CTime",""), @@ -304,7 +305,7 @@ public class StyleDataAccess sb.Clear(); sb.Append("update TabletStyleDetail set Descr=@Descr,StartX=@StartX,StartY=@StartY,FontSize=@FontSize,BreakLen=@BreakLen,"); sb.Append("FontFamily=@FontFamily,TwoOffset=@TwoOffset,ThreeOffset=@ThreeOffset,FourOffset=@FourOffset,IsActive=@IsActive,"); - sb.Append("Width=@Width,Height=@Height,TextWidth=@TextWidth,TextHeight=@TextHeight,UUser=@UUser,UDate=@UDate,UTime=@UTime "); + sb.Append("Width=@Width,Height=@Height,TextWidth=@TextWidth,TextHeight=@TextHeight,TextSpan=@TextSpan,UUser=@UUser,UDate=@UDate,UTime=@UTime "); sb.Append("where StyleID=@StyleID and ElementID=@ElementID "); //sb.Append("insert into TabletStyleDetail(StyleID,Name,Descr,ElementID,StartX,StartY,FontSize,BreakLen,FontFamily,TwoOffset,"); //sb.Append("ThreeOffset,FourOffSet,IsActive,Width,Height,TextWidth,TextHeight,CUser,CDate,CTime,UUser,UDate,UTime) "); @@ -330,6 +331,7 @@ public class StyleDataAccess new SqlParameter("@Height",item.Height), new SqlParameter("@TextWidth",item.TextWidth), new SqlParameter("@TextHeight",item.TextHeight), + new SqlParameter("@TextSpan",item.TextSpan), new SqlParameter("@CUser",""), new SqlParameter("@CDate",""), new SqlParameter("@CTime",""), diff --git a/web/App_Code/Entity/Style.cs b/web/App_Code/Entity/Style.cs index f75d688..d95664f 100644 --- a/web/App_Code/Entity/Style.cs +++ b/web/App_Code/Entity/Style.cs @@ -52,6 +52,7 @@ public class TabletStyleDetail public string Height { get; set; } public string TextWidth { get; set; } public string TextHeight { get; set; } + public string TextSpan { get; set; } public string BreakLen { get; set; } public string CUser { get; set; } public string CDate { get; set; } diff --git a/web/App_Code/api/designerController.cs b/web/App_Code/api/designerController.cs index a706e55..c7044f3 100644 --- a/web/App_Code/api/designerController.cs +++ b/web/App_Code/api/designerController.cs @@ -229,6 +229,7 @@ public class designerController : ApiController tsd.Height = item.height == null ? "" : (string)item.height; tsd.TextWidth = item.textWidth == null ? "" : (string)item.textWidth; tsd.TextHeight = item.textHeight == null ? "" : (string)item.textHeight; + tsd.TextSpan = item.textSpan == null ? "" : (string)item.textSpan; list.Add(tsd); } diff --git a/web/admin/item/TabletDesigner.aspx b/web/admin/item/TabletDesigner.aspx index c21beb8..abc7375 100644 --- a/web/admin/item/TabletDesigner.aspx +++ b/web/admin/item/TabletDesigner.aspx @@ -235,6 +235,14 @@ +
+
+
+ + +
+
+
@@ -605,7 +613,8 @@ textWidth: el.textWidth, textHeight: el.textHeight, breakLen: el.breakLen, - backendInp: el.backendImg + backendInp: el.backendImg, + textSpan:el.textSpan }; obj.push(config) @@ -751,6 +760,7 @@ $('#height').on('input', (e) => this.updateActive('height', $(e.target).val())) $('#textWidth').on('input', (e) => this.updateActive('textWidth', $(e.target).val())) $('#textHeight').on('input', (e) => this.updateActive('textHeight', $(e.target).val())) + $('#textSpan').on('input', (e) => this.updateActive('textSpan', $(e.target).val())) $(document).on('mousedown', '.tablet-element', (e) => { e.stopPropagation(); this.select($(e.currentTarget).attr('id')); @@ -852,11 +862,12 @@ border: "0px solid #ccc", padding: "1px", "font-family": el.fontFamily, - "letter-spacing": "0.1em", - "column-gap": "1px", - "row-gap": "1px", + //"letter-spacing": `${el.textSpan}px`, + "column-gap": `${el.textSpan}px`, "align-items": "center", }); + // + //"row-gap": "1px", let self = this; names.forEach(n => { $namelist.append(self.renderNameSpan(n, el)) @@ -871,10 +882,10 @@ width: `${el.textWidth}px`, "text-align": "justify", "text-align-last": "justify", - "margin-bottom": "40px", + "margin-left": "5px", "text-justify": "inter-character", - }); + });// "margin-bottom": `${el.textSpan}px`, }, renderLiveList(names, el) { console.log("renderLiveList:",names); @@ -890,11 +901,12 @@ border: "0px solid #ccc", padding: "1px", "font-family": "BiauKai", - "letter-spacing": "0.1em", - "column-gap": "1px", - "row-gap": "1px", + //"letter-spacing": `${el.textSpan}px`, + "column-gap": `${el.textSpan}px`, "align-items": "center", }); + // "column-gap": `${el.textSpan}px`, + //"row-gap": "1px", let self = this; names.forEach(n => { $namelist.append(self.renderLiveSpan(n, el)) @@ -911,10 +923,10 @@ width: `${el.textWidth}px`, "text-align": "justify", "text-align-last": "justify", - "margin-bottom": "15px", + "margin-left": "5px", "text-justify": "inter-character", - }); + });//"margin-bottom": `${el.textSpan}px`, }, // 品字佈局邏輯:一上二下 renderRoster(names, el) { @@ -933,7 +945,7 @@ "flex-direction": "row", /* 上下分層 (Top / Bottom) */ "align-items": "center", /* 左右置中對齊 */ "justify-content": "start", - gap: "20px", + gap: `${el.textSpan}px`, }); h.append(this.renderNameGroups(top,el)); if (bot.length) h.append(this.renderNameGroups(bot,el)); @@ -947,7 +959,7 @@ "height": el.textHeight, }) items.forEach(x => { - g.append($(`
${x}
`)) + g.append($(`
${x}
`)) }) return g; }, @@ -996,6 +1008,7 @@ $("#height").val(el.height); $("#textWidth").val(el.textWidth); $("#textHeight").val(el.textHeight); + $("#textSpan").val(el.textSpan); //this.render(); }, @@ -1160,7 +1173,7 @@ detail.push({ elementID: el.id, startX: el.x.toString(), startY: el.y.toString(), fontSize: el.style.fontSize, fontFamily: el.style.fontFamily, breakLen: el.breakLen, twoOffset: el.twoOffset, threeOffset: el.threeOffset, fourOffset: el.fourOffset, - isActive: el.style.visibility, width: el.width, height: el.height, textWidth: el.textWidth, textHeight: el.textHeight + isActive: el.style.visibility, width: el.width, height: el.height, textWidth: el.textWidth, textHeight: el.textHeight,textSpan:el.textSpan }); }); let sID = this.styleID diff --git a/web/admin/print/html/tablet-2C.svg b/web/admin/print/html/tablet-2C.svg new file mode 100644 index 0000000..d4920b6 --- /dev/null +++ b/web/admin/print/html/tablet-2C.svg @@ -0,0 +1,136 @@ + + + + + Layer 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/admin/print/html/tablet-2D.svg b/web/admin/print/html/tablet-2D.svg new file mode 100644 index 0000000..2f1e197 --- /dev/null +++ b/web/admin/print/html/tablet-2D.svg @@ -0,0 +1,674 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/admin/print/print_multi_new.aspx b/web/admin/print/print_multi_new.aspx index b6cad25..99775d1 100644 --- a/web/admin/print/print_multi_new.aspx +++ b/web/admin/print/print_multi_new.aspx @@ -383,9 +383,9 @@ border: "0px solid #ccc", padding: "1px", "font-family": style.fontFamily, - "letter-spacing": "0.1em", - "column-gap": "1px", - "row-gap": "1px", + //"letter-spacing": "0.1em", + "column-gap": `${d.textSpan}px`, + //"row-gap": "1px", "align-items": "center", "justify-content": "start", }); @@ -405,7 +405,7 @@ //width: `${newFontSize}px`, "text-align": "justify", "text-align-last": "justify", - "margin-bottom": "20px", + //"margin-bottom": "20px", "margin-left": "5px", "text-justify": "inter-character", "white-space": "pre-line", @@ -808,9 +808,9 @@ border: "0px solid #ccc", padding: "1px", "font-family": el.fontFamily, - "letter-spacing": "0.1em", - "column-gap": "1px", - "row-gap": "1px", + //"letter-spacing": "0.1em", + "column-gap": `${el.textSpan}px`, + //"row-gap": "1px", "align-items": "center", }); let self = this; @@ -864,7 +864,7 @@ "white-space": "pre-line" }) items.forEach(x => { - g.append($(`
${x}
`)) + g.append($(`
${x}
`)) }) return g; }, diff --git a/web/admin/print/tablet_edit/editorNewOne.html b/web/admin/print/tablet_edit/editorNewOne.html index c1645d7..7504519 100644 --- a/web/admin/print/tablet_edit/editorNewOne.html +++ b/web/admin/print/tablet_edit/editorNewOne.html @@ -1334,9 +1334,9 @@ "flex-direction": "row", "flex-wrap": "wrap", margin: "auto", - "letter-spacing": "0.1em", - "column-gap": "1px", - "row-gap": "1px", + //"letter-spacing": "0.1em", + "column-gap": `${d.textSpan}px`, + //"row-gap": "1px", "align-items": "flex-start", "justify-content": "start", }); @@ -1374,9 +1374,9 @@ border: "0px solid #ccc", padding: "1px", "font-family": style.fontFamily, - "letter-spacing": "0.1em", - "column-gap": "1px", - "row-gap": "1px", + //"letter-spacing": "0.1em", + "column-gap": `${d.textSpan}px`, + //"row-gap": "1px", "align-items": "center", "justify-content": "start", }); @@ -1396,7 +1396,7 @@ //width: `${newFontSize}px`, "text-align": "justify", "text-align-last": "justify", - "margin-bottom": "20px", + //"margin-bottom": "20px", "margin-left": "5px", "text-justify": "inter-character", "white-space": "pre-line", @@ -1418,9 +1418,9 @@ border: "0px solid #ccc", padding: "1px", "font-family": el.fontFamily, - "letter-spacing": "0.1em", - "column-gap": "1px", - "row-gap": "1px", + //"letter-spacing": "0.1em", + "column-gap": `${el.textSpan}px`, + //"row-gap": "1px", "align-items": "center", }); let self = this; @@ -1438,7 +1438,7 @@ height: `${el.textHeight}px`, "text-align": "justify", "text-align-last": "justify", - "margin-bottom": "10px", + //"margin-bottom": "10px", "text-justify": "inter-character", "white-space": "pre-line" }); @@ -1484,7 +1484,7 @@ "white-space": "pre-line" }) items.forEach(x => { - g.append($(`
${x}
`))//font-size:${el.fontSize}pt; + g.append($(`
${x}
`))//font-size:${el.fontSize}pt; }) return g; },