This is the two methods we call in drag and resize to get the start
and end date:
function getStartDate(left)
{
if (left <= 0)
return firstDate;
var d = o2s.parseDate(firstDate);
var days = (left * pixelWorthInDays) / gridSize;
days = days + 1;
var millis = days * 1000 * 60 * 60 * 24;
millis = d.getTime() + millis;
var nd = new Date();
nd.setTime(millis);
return o2s.format(nd, 'yyyy-mm-dd');
}
function getEndDate(start, width)
{
var d = o2s.parseDate(start);
days = (width * pixelWorthInDays) / gridSize;
days = days + 1;
var millis = days * 1000 * 60 * 60 * 24;
millis = d.getTime() + millis;
var nd = new Date();
nd.setTime(millis)
return o2s.format(nd, 'yyyy-mm-dd');
}
-Martin
On Mar 31, 7:29 pm, Pim <[email protected]> wrote:
> Could you show us how you're calculating the position?
>
> It could be hard to suggest improvements to your code without seeing
> it ;)
>
> On Mar 31, 6:43 am, Marlun <[email protected]> wrote:
>
> > Hello,
>
> > I'm using jQuery UI's dragging and resizing functionality. When the
> > user is dragging or resizing I want to show the position but the way
> > I've done it (calculate the position in the drag event the dragging
> > and resizing becomes very slow. Is there any suggested way of doing
> > it?
>
> > -Martin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---