Edit D:\app\Administrator\product\11.2.0\dbhome_1\j2ee\OC4J_EM\applications\em\em\jsLibs\SVGUtil.es
XLINK_NS = "http://www.w3.org/1999/xlink" SVG_NS = "http://www.w3.org/2000/svg" GF_NS = "http://xmlns.ilog.com/JViews/GraphicsFramework" JVIEWS_NS = "http://xmlns.ilog.com/JViews/SVGToolkit" function JViewsSVG() {} JViewsSVG.Views = new Array() //JOHN'S CHANGE BEGIN JViewsSVG.mainView = null; //JOHN's CHANGE END JViewsSVG.Init = function(evt) { //JOHN'S CHANGE BEGIN //JViewsSVG.target = evt.target if (JViewsSVG.target == null) { JViewsSVG.target = evt.target; } //JOHN'S CHANGE END //JOHN'S CHANGE BEGIN //JViewsSVG.UpdateMenu() //JOHN'S CHANGE END var list = evt.target.getElementsByTagNameNS(JVIEWS_NS, "view") var length = list.length for (var i = 0; i < length; i++) { var node = list.item(i) var type = node.getAttribute("type") switch (type) { case "manager": this.Views[i] = new SVGView(node) //JOHN'S CHANGE BEGIN this.mainView = this.Views[i] //JOHN'S CHANGE END break case "over": this.Views[i] = this.GetView(evt.target.getElementById(this.GetLocalRef(node.getAttributeNS(XLINK_NS, "href")))). createOverView(node) break //JOHN'S CHANGE BEGIN /* case "layer": this.Views[i] = this.GetView(evt.target.getElementById(this.GetLocalRef(node.getAttributeNS(XLINK_NS, "href")))). createLayerView(node) break case "titled": this.Views[i] = new SVGTitledView(node) break */ //JOHN'S CHANGE END default: this.Views[i] = new SVGAbstractView(node) } } } JViewsSVG.UpdateMenu = function() { if (contextMenu) { items = contextMenu.getElementsByTagName("item") for (i = 0; i < items.length; i++) { val = items.item(i).getAttribute("action") if (val == "CopySVG" || val == "ViewSVG" || val == "ViewSource" || val == "SaveAs") { items.item(i).parentNode.removeChild(items.item(i)) i-- } } } } JViewsSVG.GetView = function(svgElement) { for (var i = 0; i < this.Views.length; i++) if (this.Views[i].svg == svgElement) return this.Views[i] } JViewsSVG.GetParentView = function(element) { return JViewsSVG.GetView(element.viewportElement) } JViewsSVG.GetLocalRef = function(xlinkhref) { return xlinkhref.slice(1, xlinkhref.length) } JViewsSVG.getInnerWidth = function() { var value = JViewsSVG.target.getAttribute("width") var index = value.indexOf('%') if (index == -1) { return parseFloat(value) } else { value = parseFloat(value.substring(0, index)) return innerWidth*value/100 } } JViewsSVG.getInnerHeight = function() { var value = JViewsSVG.target.getAttribute("height") var index = value.indexOf('%') if (index == -1) { return parseFloat(value) } else { value = parseFloat(value.substring(0, index)) return innerHeight*value/100 } } JViewsSVG.lockPane = 0 JViewsSVG.lockGlassPane = function() { if (!JViewsSVG.glassPane) { JViewsSVG.glassPane = JViewsSVG.target.ownerDocument.createElementNS(SVG_NS, "rect") } if (JViewsSVG.lockPane == 0) { JViewsSVG.target.appendChild(JViewsSVG.glassPane) JViewsSVG.updateGlassPane() JViewsSVG.glassPane.setAttribute("style", "visibility:hidden;pointer-events:all") JViewsSVG.target.addEventListener("SVGScroll", JViewsSVG.updateGlassPane, false) } JViewsSVG.lockPane = JViewsSVG.lockPane+1 return JViewsSVG.glassPane } JViewsSVG.updateGlassPane = function() { JViewsSVG.glassPane.setAttribute("x", -JViewsSVG.target.currentTranslate.x/JViewsSVG.target.currentScale) JViewsSVG.glassPane.setAttribute("y", -JViewsSVG.target.currentTranslate.y/JViewsSVG.target.currentScale) JViewsSVG.glassPane.setAttribute("width", getInnerWidth() /JViewsSVG.target.currentScale) JViewsSVG.glassPane.setAttribute("height", getInnerHeight() /JViewsSVG.target.currentScale) } JViewsSVG.releaseGlassPane = function() { JViewsSVG.lockPane = JViewsSVG.lockPane - 1 if (JViewsSVG.lockPane == 0) { JViewsSVG.target.removeEventListener("SVGScroll", JViewsSVG.updateGlassPane, false) JViewsSVG.target.removeChild(JViewsSVG.glassPane) } return JViewsSVG.glassPane }
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de