javascript - Drawing a covering rect on mouseover on a svg -


i mark area active highlighting new rect.

function coverrect(el){     var x=el.x.animval.value;     var y=el.y.animval.value;     var width=el.width.animval.value;     var height=el.height.animval.value;     var svg   = document.documentelement;     var svgns = svg.namespaceuri;     var rect = document.createelementns(svgns,'rect');     rect.setattribute('x',x);     rect.setattribute('y',y);     rect.setattribute('width',width);     rect.setattribute('height',height);     rect.setattribute('fill','yellow');     svg.appendchild(rect); }  var el = document.getelementbyid('ef-vr1'); el.addeventlistener('mouseover', function(){     coverrect(el); }, false); 

the rect correctly displayed not on rect on pass mouse over. alter alpha of rect in order show below, , pass click being intercepted underlaying rect.

i managed issue changing cursor.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -