| | 447 | |
|---|
| | 448 | //if we're recreating the same extern |
|---|
| | 449 | if(newID) { |
|---|
| | 450 | //set some object properties |
|---|
| | 451 | if(typeof oldObj.fontSize!="undefined") |
|---|
| | 452 | o.setFontSize(oldObj.fontSize); |
|---|
| | 453 | if(typeof oldObj.fontFamily!="undefined") |
|---|
| | 454 | o.setFontFamily(oldObj.fontFamily); |
|---|
| | 455 | if(typeof oldObj.fontColor!="undefined") |
|---|
| | 456 | o.setFontColor(oldObj.fontColor); |
|---|
| | 457 | if(typeof oldObj.opacity!="undefined") |
|---|
| | 458 | o.setTransparency(oldObj.opacity); |
|---|
| | 459 | if(typeof oldObj.zIndex!="undefined") |
|---|
| | 460 | o.setzIndex(oldObj.zIndex); |
|---|
| | 461 | if(oldObj.visibility && typeof oldObj.visibility!="undefined") |
|---|
| | 462 | o.setVisibility(oldObj.visibility); |
|---|
| | 463 | if(typeof oldObj.width!="undefined") |
|---|
| | 464 | o.setWidth(oldObj.width); |
|---|
| | 465 | if(typeof oldObj.height!="undefined") |
|---|
| | 466 | o.setHeight(oldObj.height); |
|---|
| | 467 | if(typeof oldObj.hiddenInPerf!="undefined") |
|---|
| | 468 | o.controller.setHiddenInPerf(oldObj.hiddenInPerf); |
|---|
| | 469 | if(typeof oldObj.groupName!="undefined") |
|---|
| | 470 | o.setGroupName(oldObj.groupName); |
|---|
| | 471 | if(typeof oldObj.cssName!="undefined" && oldObj.cssName) |
|---|
| | 472 | o.setCSSName(oldObj.cssName); |
|---|
| | 473 | if(typeof oldObj.customColor!="undefined") |
|---|
| | 474 | o.setCustomColor(oldObj.customColor); |
|---|
| | 475 | if(typeof oldObj.color!="undefined" && o.customColor) |
|---|
| | 476 | o.setColor(oldObj.color); |
|---|
| | 477 | |
|---|
| | 478 | //set name/values from the inspector array |
|---|
| | 479 | if(typeof oldObj.inspectorConfig!="undefined") { |
|---|
| | 480 | for(var i=0;i<oldObj.inspectorConfig.length;i++) { |
|---|
| | 481 | if(oldObj.inspectorConfig[i].type=="number") |
|---|
| | 482 | o[oldObj.inspectorConfig[i].name]=(+oldObj.inspectorConfig[i].value); |
|---|
| | 483 | else |
|---|
| | 484 | o[oldObj.inspectorConfig[i].name]=oldObj.inspectorConfig[i].value; |
|---|
| | 485 | } |
|---|
| | 486 | } |
|---|
| | 487 | |
|---|
| | 488 | //set copy data from the coll |
|---|
| | 489 | if(typeof oldObj.collData!="undefined") { |
|---|
| | 490 | o.gColl=LilyUtils.cloneObject(oldObj.collData); |
|---|
| | 491 | } |
|---|
| | 492 | } |
|---|