Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5945c358c8
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (26 sloc) 0.567 kb
/*
Sets a component property on multiple selected components
*/
var sel = fl.getDocumentDOM().selection;
var pname = prompt('What property do you want to set?');
if(pname) {
var pvalue = prompt('What value do you want to set it to?');
if(pvalue != null) {
for(var i = 0; i < sel.length; ++i) {
var s = sel[i];
if(s.parameters) {
var j = 0;
var p = null;
while(j < s.parameters.length && !p) {
if(s.parameters[j].name == pname) {
p = s.parameters[j];
}
j++;
}
if(p) {
p.value = pvalue;
}
}
}
}
}
Jump to Line
Something went wrong with that request. Please try again.