user1517108
user1517108

Reputation: 2415

Raphaeljs - Edit a simple rectangle into complex polygon

BACKGROUND:

I am currently working on a floorplan editor where the user can create a floorplan of a house.

SCENARIO and ISSUE:

At times a user may want to build a room that is not a rectangle but L-shaped. I want to give the user a choice to split the specific wall of the room and then drag one part of the split wall - thus creating an L-shape. This can be best viewed in this amazing site , where a wall of a room can be selected, then split, and one of the split part can be dragged.

QUESTION:

A> How can I replicate this functionality in Raphaeljs? Keeping in mind that I will have to access dimensions of rooms later on for some calculations.

B> Is there any other method (SVG/CANVAS etc.) or any other library (processing.js, page.js, kinect.js, jQuery SVG etc) in which I can build the floorplanner in an easier way.

Thanks

Upvotes: 0

Views: 387

Answers (1)

Qnan
Qnan

Reputation: 3744

I would say that such visualization can be implemented with a comparable amount of effort using Raphael or Canvas or SVG. The choice should be based on the browsers you target, performance concerns and your familiarity with these techniques.

Please do not confuse the actual logic and visualization, though. It is not a good idea to store the coordinates in the visualization component only.

Upvotes: 1

Related Questions