How to use the xui.svg function in xui

To help you get started, we’ve selected a few xui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github linb / CrossUI / xui1.3 / xui / js / UI / Resizer.js View on Github external
var update = function(pro, target, size, cssPos){
                        var profile=arguments.callee.profile,
                            node=profile.getRoot(),
                            instance=profile.boxing(),
                            prop=profile.properties,
                            svg=profile.box['xui.svg'],
                            t;
                        if(size){
                            var w=null,h=null,l=null,t=null;
                            if(t=size.width){
                                node.widthBy(t);
                                prop.width = w = svg?instance.getWidth():node.width();
                            }
                            if(t=size.height){
                                node.heightBy(t);
                                prop.height = h = svg?instance.getHeight():node.height();
                            }
                            xui.UI.$tryResize(profile,w,h,true);

                            // for no _onresize widget only
                            if(!profile.box._onresize && profile.onResize && (w!==null||h!==null))
                                instance.onResize(profile,w,h);
github linb / CrossUI / xui1.4 / xui / js / UI / Resizer.js View on Github external
var update = function(pro, target, size, cssPos){
                        var profile=arguments.callee.profile,
                            node=profile.getRoot(),
                            instance=profile.boxing(),
                            prop=profile.properties,
                            svg=profile.box['xui.svg'],
                            t;
                        if(size){
                            var w=null,h=null,l=null,t=null;
                            if(t=size.width){
                                node.widthBy(t);
                                prop.width = w = svg?instance.getWidth():node.width();
                            }
                            if(t=size.height){
                                node.heightBy(t);
                                prop.height = h = svg?instance.getHeight():node.height();
                            }
                            xui.UI.$tryResize(profile,w,h,true);

                            // for no _onresize widget only
                            if(!profile.box._onresize && profile.onResize && (w!==null||h!==null))
                                instance.onResize(profile,w,h);
github linb / CrossUI / xui1.2 / xui / js / UI / Resizer.js View on Github external
var update = function(pro, target, size, cssPos){
                        var profile=arguments.callee.profile,
                            node=profile.getRoot(),
                            instance=profile.boxing(),
                            prop=profile.properties,
                            svg=profile.box['xui.svg'],
                            t;
                        if(size){
                            var w=null,h=null,l=null,t=null;
                            if(t=size.width){
                                node.widthBy(t);
                                prop.width = w = svg?instance.getWidth():node.width();
                            }
                            if(t=size.height){
                                node.heightBy(t);
                                prop.height = h = svg?instance.getHeight():node.height();
                            }
                            xui.UI.$tryResize(profile,w,h,true);

                            // for no _onresize widget only
                            if(!profile.box._onresize && profile.onResize && (w!==null||h!==null))
                                instance.onResize(profile,w,h);
github linb / CrossUI / xui / js / UI / Resizer.js View on Github external
var update = function(pro, target, size, cssPos){
                        var profile=arguments.callee.profile,
                            node=profile.getRoot(),
                            instance=profile.boxing(),
                            prop=profile.properties,
                            svg=profile.box['xui.svg'],
                            t;
                        if(size){
                            var w=null,h=null,l=null,t=null;
                            if(t=size.width){
                                node.widthBy(t);
                                prop.width = w = profile.$forceu(svg?instance.getWidth():node.width());
                            }
                            if(t=size.height){
                                node.heightBy(t);
                                prop.height = h = profile.$forceu(svg?instance.getHeight():node.height());
                            }
                            xui.UI.$tryResize(profile,w,h,true);

                            // for no _onresize widget only
                            if(!profile.box._onresize && profile.onResize && (w!==null||h!==null))
                                instance.onResize(profile,w,h);
github linb / CrossUI / xui1.2 / xui / js / UI / SVGPaper.js View on Github external
_.arr.each(profile.children,function(o){
                if(o[0].box["xui.svg"])a.push(o[0]);
            });
            if(a.length){
github linb / CrossUI / xui2.0 / xui / js / UI / SVGPaper.js View on Github external
target.each(function(prf){
                isSvg=!!prf.box['xui.svg'];
                if(isSvg&&prf.renderId){
                    prf.clearCache();
                    prf.$beforeDestroy["svgClear"]();
                    delete prf.renderId;
                    delete prf.rendered;
                    rendersvg=1;
                }
                f.call(ns, prf, null, pre, base, isSvg, ns.get(0)&&xui(ns.get(0)._canvas));
                if(rendersvg){
                    prf.box._initAttr2UI(prf);
                }
            });
            return this;
github linb / CrossUI / xui / js / Tips.js View on Github external
this.hide = function(){
                    if(!xui.Tips.HTMLTips){
                        var t=xui.Tips._activePrf;
                        if(t){
                            if(t.box['xui.svg']) t.boxing().setAttr('KEY',{title:null},false);
                            else  xui.Tips._activeNode.attr('title', null);
                        }
                    }else{
                        this.node.css('zIndex',0).hide();
                    }
                };
            }
github linb / CrossUI / xui1.3 / xui / js / UI / SVGPaper.js View on Github external
_.arr.each(profile.children,function(o){
                if(o[0].box["xui.svg"])a.push(o[0]);
            });
            if(a.length){
github linb / CrossUI / xui1.4 / xui / js / UI / SVGPaper.js View on Github external
_.arr.each(profile.children,function(o){
                if(o[0].box["xui.svg"])a.push(o[0]);
            });
            if(a.length){
github linb / CrossUI / xui1.2 / xui / js / UI / SVGPaper.js View on Github external
target.each(function(prf){
                isSvg=!!prf.box['xui.svg'];
                if(isSvg&&prf.renderId){
                    prf.clearCache();
                    prf.$beforeDestroy["svgClear"]();
                    delete prf.renderId;
                    delete prf.rendered;
                    rendersvg=1;
                }
                f.call(ns, prf, null, pre, base, isSvg, ns.get(0)&&xui(ns.get(0)._canvas));
                if(rendersvg){
                    prf.box._initAttr2UI(prf);
                }
            });
            return this;