svgedit icon indicating copy to clipboard operation
svgedit copied to clipboard

Programitaccly tirrgering clone button

Open techInnovator1999 opened this issue 1 year ago • 2 comments

Describe the bug when i programmatically trigger clone button it adds cloned object but if I move that object the blue dotted outline remain there until unless I reload the editor

Expected behavior It should clone but without a blue outline

SVG-Edit environment (IMPORTANT)

  • File for SVG-Edit: editor.js
  • Version: v7
  • Protocol: [e.g., http, https, file]

Desktop (please complete the following information):

  • OS: Linux, Windows
  • Browser chrome
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Screenshots Screen Shot 2023-11-18 at 1 09 02 AM

techInnovator1999 avatar Nov 23 '23 06:11 techInnovator1999

Can you please show the code you have used to programmatically clone objects. are you using "this.editor.svgCanvas.cloneSelectedElements()" ??

jfhenon avatar Dec 09 '23 15:12 jfhenon

@jfhenon in TopPanel.js file there is method: /** *

  • @returns {void} */ clickClone () { this.editor.svgCanvas.cloneSelectedElements(20, 20) }

I am calling this method like: this.clickClone(); it does its job and clones the selected element but the issue is with blue doted line with stays there even I move the cloned object from its place as I have mentioned in my previous comment. If there is any solution to remove those blue doted lines programmatically, please let me know and feel free to ask anything about this.

techInnovator1999 avatar Dec 09 '23 18:12 techInnovator1999