rubberband box now looks rihght in opera

master
Mark MacKay 2012-07-25 18:50:12 -05:00
parent cb494273ca
commit 6fb2e55f48
4 changed files with 4 additions and 4 deletions

View File

@ -546,7 +546,7 @@ svgedit.select.SelectorManager.prototype.getRubberBandBox = function() {
'element': 'rect',
'attr': {
'id': 'selectorRubberBand',
'fill': 'transparent',
'fill': 'none',
'stroke': '#666',
'stroke-width': 1,
'stroke-dasharray': '3,2',

View File

@ -150,7 +150,7 @@ width:c[0],height:c[1],x:0,y:0,overflow:svgedit.browser.isWebkit()?"none":"visib
d=a.createSVGElement({element:"rect",attr:{x:5,y:5,width:5,height:5,fill:"#eee"}}),l=a.createSVGElement({element:"rect",attr:{width:"100%",height:"100%",x:0,y:0,"stroke-width":1,stroke:"#000",fill:"url(#checkerPattern)",style:"pointer-events:none"}});c.appendChild(n);n.appendChild(s);s.appendChild(b);s.appendChild(f);s.appendChild(d);c.appendChild(l);a.svgRoot().insertBefore(c,a.svgContent())}};svgedit.select.SelectorManager.prototype.requestSelector=function(c){if(c==null)return null;var n=this.selectors.length;
if(typeof this.selectorMap[c.id]=="object"){this.selectorMap[c.id].locked=true;return this.selectorMap[c.id]}for(var s=0;s<n;++s)if(this.selectors[s]&&!this.selectors[s].locked){this.selectors[s].locked=true;this.selectors[s].reset(c);this.selectorMap[c.id]=this.selectors[s];return this.selectors[s]}this.selectors[n]=new svgedit.select.Selector(n,c);this.selectorParentGroup.appendChild(this.selectors[n].selectorGroup);this.selectorMap[c.id]=this.selectors[n];return this.selectors[n]};svgedit.select.SelectorManager.prototype.releaseSelector=
function(c){if(c!=null)for(var n=this.selectors.length,s=this.selectorMap[c.id],b=0;b<n;++b)if(this.selectors[b]&&this.selectors[b]==s){s.locked==false&&console.log("WARNING! selector was released but was already unlocked");delete this.selectorMap[c.id];s.locked=false;s.selectedElement=null;s.showGrips(false);try{s.selectorGroup.setAttribute("display","none")}catch(f){}break}};svgedit.select.SelectorManager.prototype.getRubberBandBox=function(){if(!this.rubberBandBox)this.rubberBandBox=this.selectorParentGroup.appendChild(a.createSVGElement({element:"rect",
attr:{id:"selectorRubberBand",fill:"transparent",stroke:"#666","stroke-width":1,"stroke-dasharray":"3,2",display:"none",style:"pointer-events:none"}}));return this.rubberBandBox};svgedit.select.init=function(c,n){p=c;a=n;g=new svgedit.select.SelectorManager;a.createSVGElement({element:"g",attr:{id:"hover_group"}})};svgedit.select.getSelectorManager=function(){return g}})();svgedit=svgedit||{};
attr:{id:"selectorRubberBand",fill:"none",stroke:"#666","stroke-width":1,"stroke-dasharray":"3,2",display:"none",style:"pointer-events:none"}}));return this.rubberBandBox};svgedit.select.init=function(c,n){p=c;a=n;g=new svgedit.select.SelectorManager;a.createSVGElement({element:"g",attr:{id:"hover_group"}})};svgedit.select.getSelectorManager=function(){return g}})();svgedit=svgedit||{};
(function(){if(!svgedit.draw)svgedit.draw={};var a="a,circle,ellipse,foreignObject,g,image,line,path,polygon,polyline,rect,svg,text,tspan,use".split(","),p={LET_DOCUMENT_DECIDE:0,ALWAYS_RANDOMIZE:1,NEVER_RANDOMIZE:2},g=p.LET_DOCUMENT_DECIDE;svgedit.draw.Layer=function(c,n){this.name_=c;this.group_=n};svgedit.draw.Layer.prototype.getName=function(){return this.name_};svgedit.draw.Layer.prototype.getGroup=function(){return this.group_};svgedit.draw.randomizeIds=function(c,n){g=c==false?p.NEVER_RANDOMIZE:
p.ALWAYS_RANDOMIZE;if(g==p.ALWAYS_RANDOMIZE&&!n.getNonce())n.setNonce(Math.floor(Math.random()*100001));else g==p.NEVER_RANDOMIZE&&n.getNonce()&&n.clearNonce()};svgedit.draw.Drawing=function(c,n){if(!c||!c.tagName||!c.namespaceURI||c.tagName!="svg"||c.namespaceURI!="http://www.w3.org/2000/svg")throw"Error: svgedit.draw.Drawing instance initialized without a <svg> element";this.svgElem_=c;this.obj_num=0;this.idPrefix=n||"svg_";this.releasedNums=[];this.all_layers=[];this.current_layer=null;this.nonce_=
"";var s=this.svgElem_.getAttributeNS("http://svg-edit.googlecode.com","nonce");if(s&&g!=p.NEVER_RANDOMIZE)this.nonce_=s;else g==p.ALWAYS_RANDOMIZE&&this.setNonce(Math.floor(Math.random()*100001))};svgedit.draw.Drawing.prototype.getElem_=function(c){return this.svgElem_.querySelector?this.svgElem_.querySelector("#"+c):$(this.svgElem_).find("[id="+c+"]")[0]};svgedit.draw.Drawing.prototype.getSvgElem=function(){return this.svgElem_};svgedit.draw.Drawing.prototype.getNonce=function(){return this.nonce_};

View File

@ -546,7 +546,7 @@ svgedit.select.SelectorManager.prototype.getRubberBandBox = function() {
'element': 'rect',
'attr': {
'id': 'selectorRubberBand',
'fill': 'transparent',
'fill': 'none',
'stroke': '#666',
'stroke-width': 1,
'stroke-dasharray': '3,2',

View File

@ -150,7 +150,7 @@ width:c[0],height:c[1],x:0,y:0,overflow:svgedit.browser.isWebkit()?"none":"visib
d=a.createSVGElement({element:"rect",attr:{x:5,y:5,width:5,height:5,fill:"#eee"}}),l=a.createSVGElement({element:"rect",attr:{width:"100%",height:"100%",x:0,y:0,"stroke-width":1,stroke:"#000",fill:"url(#checkerPattern)",style:"pointer-events:none"}});c.appendChild(n);n.appendChild(s);s.appendChild(b);s.appendChild(f);s.appendChild(d);c.appendChild(l);a.svgRoot().insertBefore(c,a.svgContent())}};svgedit.select.SelectorManager.prototype.requestSelector=function(c){if(c==null)return null;var n=this.selectors.length;
if(typeof this.selectorMap[c.id]=="object"){this.selectorMap[c.id].locked=true;return this.selectorMap[c.id]}for(var s=0;s<n;++s)if(this.selectors[s]&&!this.selectors[s].locked){this.selectors[s].locked=true;this.selectors[s].reset(c);this.selectorMap[c.id]=this.selectors[s];return this.selectors[s]}this.selectors[n]=new svgedit.select.Selector(n,c);this.selectorParentGroup.appendChild(this.selectors[n].selectorGroup);this.selectorMap[c.id]=this.selectors[n];return this.selectors[n]};svgedit.select.SelectorManager.prototype.releaseSelector=
function(c){if(c!=null)for(var n=this.selectors.length,s=this.selectorMap[c.id],b=0;b<n;++b)if(this.selectors[b]&&this.selectors[b]==s){s.locked==false&&console.log("WARNING! selector was released but was already unlocked");delete this.selectorMap[c.id];s.locked=false;s.selectedElement=null;s.showGrips(false);try{s.selectorGroup.setAttribute("display","none")}catch(f){}break}};svgedit.select.SelectorManager.prototype.getRubberBandBox=function(){if(!this.rubberBandBox)this.rubberBandBox=this.selectorParentGroup.appendChild(a.createSVGElement({element:"rect",
attr:{id:"selectorRubberBand",fill:"transparent",stroke:"#666","stroke-width":1,"stroke-dasharray":"3,2",display:"none",style:"pointer-events:none"}}));return this.rubberBandBox};svgedit.select.init=function(c,n){p=c;a=n;g=new svgedit.select.SelectorManager;a.createSVGElement({element:"g",attr:{id:"hover_group"}})};svgedit.select.getSelectorManager=function(){return g}})();svgedit=svgedit||{};
attr:{id:"selectorRubberBand",fill:"none",stroke:"#666","stroke-width":1,"stroke-dasharray":"3,2",display:"none",style:"pointer-events:none"}}));return this.rubberBandBox};svgedit.select.init=function(c,n){p=c;a=n;g=new svgedit.select.SelectorManager;a.createSVGElement({element:"g",attr:{id:"hover_group"}})};svgedit.select.getSelectorManager=function(){return g}})();svgedit=svgedit||{};
(function(){if(!svgedit.draw)svgedit.draw={};var a="a,circle,ellipse,foreignObject,g,image,line,path,polygon,polyline,rect,svg,text,tspan,use".split(","),p={LET_DOCUMENT_DECIDE:0,ALWAYS_RANDOMIZE:1,NEVER_RANDOMIZE:2},g=p.LET_DOCUMENT_DECIDE;svgedit.draw.Layer=function(c,n){this.name_=c;this.group_=n};svgedit.draw.Layer.prototype.getName=function(){return this.name_};svgedit.draw.Layer.prototype.getGroup=function(){return this.group_};svgedit.draw.randomizeIds=function(c,n){g=c==false?p.NEVER_RANDOMIZE:
p.ALWAYS_RANDOMIZE;if(g==p.ALWAYS_RANDOMIZE&&!n.getNonce())n.setNonce(Math.floor(Math.random()*100001));else g==p.NEVER_RANDOMIZE&&n.getNonce()&&n.clearNonce()};svgedit.draw.Drawing=function(c,n){if(!c||!c.tagName||!c.namespaceURI||c.tagName!="svg"||c.namespaceURI!="http://www.w3.org/2000/svg")throw"Error: svgedit.draw.Drawing instance initialized without a <svg> element";this.svgElem_=c;this.obj_num=0;this.idPrefix=n||"svg_";this.releasedNums=[];this.all_layers=[];this.current_layer=null;this.nonce_=
"";var s=this.svgElem_.getAttributeNS("http://svg-edit.googlecode.com","nonce");if(s&&g!=p.NEVER_RANDOMIZE)this.nonce_=s;else g==p.ALWAYS_RANDOMIZE&&this.setNonce(Math.floor(Math.random()*100001))};svgedit.draw.Drawing.prototype.getElem_=function(c){return this.svgElem_.querySelector?this.svgElem_.querySelector("#"+c):$(this.svgElem_).find("[id="+c+"]")[0]};svgedit.draw.Drawing.prototype.getSvgElem=function(){return this.svgElem_};svgedit.draw.Drawing.prototype.getNonce=function(){return this.nonce_};