11
11
* Compatible with other jQuery UI widgets included Draggable and Resizable
12
12
* Compatible with Dave Furfero's jQuery UI Touch Punch
13
13
* All angles in degrees
14
- * AlsoRotate extension
14
+ * "alsoRotate" extension (under construction)
15
+ * "animate" extension (under construction)
15
16
*
16
17
* Usages:
17
18
* $('#foo .bar').rotatable();
@@ -289,6 +290,11 @@ $.widget('ui.rotatable', $.ui.mouse, {
289
290
jqHandle . appendTo ( this . element ) ;
290
291
this . _disableSelection ( jqHandle ) ;
291
292
}
293
+ //alert('top:' + jqHandle.css('top') + ' right:' + jqHandle.css('right') + ' bottom:' + jqHandle.css('bottom') + ' left:' + jqHandle.css('left'));
294
+ var top = jqHandle . css ( 'top' ) ;
295
+ var right = jqHandle . css ( 'right' ) ;
296
+ var bottom = jqHandle . css ( 'bottom' ) ;
297
+ var left = jqHandle . css ( 'left' ) ;
292
298
if ( jqHandle . css ( 'position' ) !== 'absolute' ) {
293
299
jqHandle . css ( 'position' , 'absolute' ) ;
294
300
}
@@ -298,6 +304,12 @@ $.widget('ui.rotatable', $.ui.mouse, {
298
304
if ( jqHandle . height ( ) < 1 ) {
299
305
jqHandle . height ( 9 ) ;
300
306
}
307
+ if ( top === 'auto' && bottom === 'auto' ) {
308
+ jqHandle . css ( 'top' , '0px' ) ;
309
+ }
310
+ if ( left === 'auto' && right === 'auto' ) {
311
+ jqHandle . css ( 'left' , '0px' ) ;
312
+ }
301
313
if ( jqHandle . css ( 'cursor' ) === 'auto' ) {
302
314
jqHandle . css ( 'cursor' , 'grab' ) ;
303
315
}
@@ -483,6 +495,7 @@ $.ui.plugin.add('rotatable', 'alsoRotate', {
483
495
$ ( o . alsoRotate ) . each ( function ( ) {
484
496
var element = $ ( this ) ;
485
497
element . data ( 'ui-rotatable-alsorotate' , { } ) ;
498
+ // todo: complete here
486
499
} ) ;
487
500
} ,
488
501
@@ -491,6 +504,7 @@ $.ui.plugin.add('rotatable', 'alsoRotate', {
491
504
$ ( o . alsoRotate ) . each ( function ( ) {
492
505
var element = $ ( this ) ;
493
506
var start = element . data ( 'ui-rotatable-alsorotate' ) ;
507
+ // todo: complete here
494
508
} ) ;
495
509
} ,
496
510
@@ -500,6 +514,14 @@ $.ui.plugin.add('rotatable', 'alsoRotate', {
500
514
501
515
} ) ;
502
516
517
+ $ . ui . plugin . add ( 'rotatable' , 'animate' , {
518
+
519
+ stop : function ( ) {
520
+ // todo: complete here
521
+ }
522
+
523
+ } ) ;
524
+
503
525
// /Rotatable Extensions
504
526
505
527
var widgetsRotatable = $ . ui . rotatable ;
0 commit comments