Wednesday 15 July 2015

javascript - Move an SVG element across Divs -


How can you move svg into a div in a div in a SVG?

Move the red circle to the left.

Here.

  & lt; Div id = "parent" & gt; & Lt; Div id = "left" & gt; & Lt; Svg id = "leftSVG" xmlns = "http://www.w3.org/2000/svg" version = "1.1" & gt; & Lt; / Svg & gt; & Lt; / Div & gt; & Lt; Div id = "right" & gt; & Lt; Svg id = "rightSVG" xmlns = "http://www.w3.org/2000/svg" version = "1.1" & gt; & Lt; / Svg & gt; & Lt; / Div & gt; & Lt; / Div & gt; Finally, a basic proof of the concept of a project can be found (we are reading excerpts with music), but we are trying to implement the idea of ​​"factory" Where beats are made, and can be dragged on a solution Given that we have many ideas, we use spinal cord, which uses the HTML template from _underscore.  

As we are using the Edge HTML 5 audio, we are limited to Chrome only, so the issues with Firefox should not be a problem.

Any other suggestions? Like:

  • A SVG that covers that page, and it has z-index of 1
  • Combination with JQueryUI
  • SVG's Follow, drag and drop it again, in the deleted SVG area?

    In which I am basically seeing that you have other SVG (negative) X is the mode in place and then I repeat the appropriate SVG there.

      drag.on ("dragend", function () {If (d3.select (this) .attr ("cx") & lt; 0) {var newX = d3.select ( This) .attr ("cx"); newX = parseInt (left.attr ('width')) + ParseInt (newX); var newY = d3.select (this) .attr ("cy"); console.log ( Take it to '', new x); left.append ('g') .append ('' r ',' 10 ') .attr (' cx ', newX) .attr (' cy ', newY) .attr ('id', 'left' + newx) .attr ('fill', 'red') .attr ('stroke', 'black') .attr ('conversion', 'translation (0,0)' )}}});    

No comments:

Post a Comment