$.widget("ui.iframeNode",$.ui.sceneResource,{options:{data:null,parent:null,zoom:$.noop,onupdate:$.noop,ondelete:$.noop,addHistory:$.noop},bgSize:{width:800,height:450},category:"iframes",defaultValues:{type:"",id:"",rotation:0,opacity:1,zIndex:0,position:{x:0,y:0},webLink:"",size:{width:800,height:450},radius:0,border:{stroke:0,color:"#000000"},hiddenAtStart:!1},sourceProp:["webLink","size","radius","border"],needToUpdateJson:!0,initElement:function(){$.ui.sceneResource.prototype.initElement.apply(this,arguments);this.$inner.addClass("iframe-element")},initData:function(){$.ui.sceneResource.prototype.initData.apply(this,arguments);this.updateBorder();this.updateRadius()},resize:function(t,e,i,s){var h=this.element;h.css({top:e.y+s.y+"px",left:e.x+s.x+"px",width:t.width+i.width+"px",height:t.height+i.height+"px"});this.elementData("size",this.getRealSize());this.elementData("position",this.getRealPosition());this.updatePreview();this.isSelected()&&this.onselect()},getCurrentData:function(){var t={};return t},radius:function(t){var e=this.elementData("radius",t);if(void 0===t)return e;this.updateRadius();return void 0},border:function(t){var e=this.elementData("border",t);if(void 0===t)return e;this.updateBorder();return void 0},updatePreview:function(t){t||(t=this.zoomValue);var e=this.element,i=this.size();this.position();e.css({width:i.width*t,height:i.height*t});var s=this.$inner,h=Math.min(i.width/this.bgSize.width,i.height/this.bgSize.height);s.css({width:this.bgSize.width*h*t,height:this.bgSize.height*h*t,position:"absolute",left:(i.width-this.bgSize.width*h)*t/2,top:(i.height-this.bgSize.height*h)*t/2})},updateBorder:function(){var t=this.border()||{};this.element.css("border",(t.stroke||0)+"px "+(t.color||"#000")+" solid")},updateRadius:function(){this.element.css("border-radius",this.radius()+"px")},getDomSize:function(){return{width:this.element.width(),height:this.element.height()}}});