summerstyle / summer

Html image map editor based on javascript, html5, inline SVG (modern FF, Chrome, Opera and IE10+)
http://summerstyle.github.io/summer/
MIT License
356 stars 136 forks source link

How to make drawn area into textbox css? #7

Closed shamun closed 9 years ago

shamun commented 9 years ago

How can i make the drawn rectangle into text-box with css?

http://stackoverflow.com/questions/32239391/how-to-get-the-css-left-top-width-height-from-coords?noredirect=1#comment52360719_32239391

in dreamweaver you can draw text box on top of image just like you can do rectangle. in dreamweaver they make inline css for the textbox, such as:

<input type=text style="position:absolute; left: ??px; top: ??px; width:??px; height:??px;" />

how can i do this with this tool please?

shamun commented 9 years ago

Can you please make the program update so that coords can be converted to CSS for position: absolute?

coords defines (left-top-x, left-top-y, right-bottom-x, right-bottom-y). SO:

shamun commented 9 years ago

Is it fixed? is it available now? when it will be available please?

summerstyle commented 9 years ago

Hi,

I make fully refactoring of my app at this autumn, and in future coords info (x, y, width, height) will display in area properties window.

Now, the generated code of map areas contains absolute coordinates of points (x1, y1, x2, y2). You can calculate width and height of rectangle (x = x1, y = y1, width = x2 - x1, height = y2 - y1). The images in this my article http://habrahabr.ru/post/152731/ will help you.

Or, simply, you can:

  1. Draw areas in my editor
  2. Open Firebug (or similar tool)
  3. Right click on your rectangle, in the context menu select Inspect element
  4. Firebug will show you the svg rect element with your coords

111

shamun commented 9 years ago

Can you not do it like DreamWeaver? in DreamWeaver you get complete <input type=text with inline css. in your screen shot its showing x=value y=value width=value height=value. Assume i have a large form with 100 input boxes and many slides then doing this manually will be very time consuming.

with dreamweaver you can visually draw text box on top of images which is very fast.

summerstyle commented 9 years ago

No, the main target of my editor is a drawing HTML image maps, and also you can draw areas only to get coords and then manually add this coords to your code.

shamun commented 9 years ago

NO - then its good for nothing tool. The tool has to allow text box drawing like DreamWeaver did. else its waste of time like all other tools out there.