Opened 4 years ago

Last modified 3 years ago

#8882 open feature

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.

Change History (5)

comment:1 Changed 4 years ago by albanx

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

comment:2 Changed 4 years ago by tj.vantoll

Milestone: 1.10.0none

comment:3 Changed 4 years ago by tj.vantoll

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.

comment:4 Changed 4 years ago by tj.vantoll

#4812 is a duplicate of this ticket.

comment:5 Changed 3 years ago by tj.vantoll

#9892 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.