Skip to main content

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:

http://jsfiddle.net/UhTvs/3/

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 albanx comment:1

just and edit to the jsfiddle example: http://jsfiddle.net/UhTvs/4/

Changed January 25, 2013 09:23PM UTC by tj.vantoll comment:2

milestone: 1.10.0none

Changed March 04, 2013 04:41PM UTC by tj.vantoll comment:3

component: ui.resizableui.draggable
status: newopen
summary: jquery resizable, draggable using parseInt instead of parseFloatDraggable / Resizable / Sortable: Supporting floating point values in style properties
type: bugfeature

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.

Changed March 04, 2013 04:45PM UTC by tj.vantoll comment:4

#4812 is a duplicate of this ticket.

Changed March 06, 2014 03:32AM UTC by tj.vantoll comment:5

#9892 is a duplicate of this ticket.