Search and Top Navigation
#8882 open feature ()
Opened December 05, 2012 07:41AM UTC
Last modified March 06, 2014 03:32AM UTC
Draggable / Resizable / Sortable: Supporting floating point values in style properties
Reported by: | albanx | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.draggable | Version: | 1.9.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I notice that in jquery ui for reading width, height top and other css numeric properties, parseInt is used instead of parseFloat. That causes trunkate of numbers and loose of precision.
For example if I have a resizabel div in absolute position at 48,9 top, after resize the position will change to 48.0 cause of the num function doing a parseInt of top.
Example:
Can I change safetly from parseInt to parseFloat? I need it for my application.
Attachments (0)
Change History (5)
Changed December 06, 2012 12:00PM UTC by comment:1
Changed January 25, 2013 09:23PM UTC by comment:2
milestone: | 1.10.0 → none |
---|
Changed March 04, 2013 04:41PM UTC by comment:3
component: | ui.resizable → ui.draggable |
---|---|
status: | new → open |
summary: | jquery resizable, draggable using parseInt instead of parseFloat → Draggable / Resizable / Sortable: Supporting floating point values in style properties |
type: | bug → feature |
I'm going to mark this as a valid feature request. This has repercussions throughout the interactions and is something we should discuss whether we want to support for the interaction rewrite.
just and edit to the jsfiddle example: http://jsfiddle.net/UhTvs/4/