Skip to content

How to make a line draggable with InteractiveSVG? #1

@q2apro

Description

@q2apro

I am trying the examples provided and changed the code to make a line itself draggable:

svg.addLine({p1: A, p2: B, draggable: true});

But clicking the line does not work.

Full code:

	var sgv_width = 300;
	var sgv_height = 300;

        (function() {
            var svg = InteractiveSVG.create('svg-3', sgv_width, sgv_height);
            var A = svg.addPoint({ x: 40, y: 75 });
            var B = svg.addPoint({ x: 160, y: 75 });
            svg.addLine({p1: A, p2: B, draggable: true});  // seems not to work
        })();

2022-10-25

How to make the line itself draggable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions