As of now, I have a dynamic graph inside of a rectangle. The rectangle itself is coded like:
<rect width="50%" height="100px" class="graph_rect" style="fill:none;pointer-events:all;" </rect>
Right now, I don't have any JavaScript code that works for this goal. But, I was hoping to create another rectangle on top of "graph_rect" such that:
Add an onclick
attribute to graph_rect
. When graph_rect
is clicked, you can then call a function to toggle its visibility
.
You can also use the Drag and Drop feature of HTML5 in order to determine when the element is being dragged and adjust the size and position of the element accordingly.
https://www.w3schools.com/css/css_display_visibility.asp https://www.w3schools.com/html/html5_draganddrop.asp
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.