ScriptUI-Dialog-Builder-Joonas icon indicating copy to clipboard operation
ScriptUI-Dialog-Builder-Joonas copied to clipboard

Hidden multiline staticText item breaks the code

Open joonaspaakko opened this issue 4 years ago • 0 comments

There's an extra linebreak after the text that doesn't translate into SUI multiline properly and ends up just inserting a linebreak before the tail-end of the line. I guess this would be kind of an issue without hiding as well.

Noticed this problem in this issue: #81

/*
Code for Import https://scriptui.joonas.me — (Triple click to select): 
{"items":{"item-0":{"id":0,"type":"Dialog","parentId":false,"style":{"enabled":true,"varName":"","windowType":"Dialog","creationProps":{"su1PanelCoordinates":false,"maximizeButton":false,"minimizeButton":false,"independent":false,"closeButton":true,"borderless":false,"resizeable":false},"text":"","preferredSize":[0,0],"margins":20,"orientation":"column","spacing":10,"alignChildren":["center","top"]}},"item-28":{"id":28,"type":"StaticText","parentId":0,"style":{"enabled":true,"varName":null,"creationProps":{"truncate":"none","multiline":false,"scrolling":false},"softWrap":false,"text":"Label Color\n","justify":"left","preferredSize":[0,0],"alignment":null,"helpTip":null},"hidden":true}},"order":[0,28],"settings":{"importJSON":true,"indentSize":false,"cepExport":false,"includeCSSJS":true,"showDialog":true,"functionWrapper":false,"afterEffectsDockable":false,"itemReferenceList":"None"},"activeId":28}
*/ 

// DIALOG
// ======
var dialog = new Window("dialog"); 
    dialog.orientation = "column"; 
    dialog.alignChildren = ["center","top"]; 
    dialog.spacing = 10; 
    dialog.margins = 20; 

// var statictext1 = dialog.add("statictext", undefined, undefined, {name: "statictext1"}); 
    // statictext1.text = "Label Color
"; 

dialog.show();

joonaspaakko avatar May 15 '20 06:05 joonaspaakko