This repository was archived by the owner on May 27, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +26
-6
lines changed Expand file tree Collapse file tree 3 files changed +26
-6
lines changed Original file line number Diff line number Diff line change 6
6
* Add Google Nexus 7 (2013)
7
7
* #13 : Fix the width of device sub-menu
8
8
* #15 : Set the Ajax loading indicator at the center of screen
9
+ * #16 : Cannot move the mouse out of the frame after resizing the frame
9
10
10
11
v1.2.0 (2013/09/27)
11
12
Original file line number Diff line number Diff line change 49
49
padding : 0 ;
50
50
width : 100% ;
51
51
height : 100% ;
52
- }
52
+ }
Original file line number Diff line number Diff line change @@ -56,22 +56,41 @@ angular
56
56
$compile ( newElement ) ( $scope ) ;
57
57
$element . replaceWith ( newElement ) ;
58
58
}
59
- }
59
+ } ;
60
60
} )
61
61
. directive ( 'rtResizable' , function ( ) {
62
62
return {
63
63
restrict : 'A' ,
64
64
link : function ( $scope , $element , $attrs ) {
65
- var parent = $scope . $parent ;
65
+ var parentScope = $scope . $parent ;
66
+
67
+ // Cannot move the mouse out of the frame after resizing the frame
68
+ $element . css ( 'position' , 'relative' ) ;
69
+ var $mask = $ ( '<div/>' ) . css ( {
70
+ position : 'absolute' ,
71
+ top : 0 ,
72
+ width : 0 ,
73
+ margin : 0 ,
74
+ padding : 0 ,
75
+ width : '100%' ,
76
+ height : '100%'
77
+ } ) . hide ( ) . prependTo ( $element ) ;
78
+
66
79
$element . resizable ( {
80
+ start : function ( event , ui ) {
81
+ $mask . show ( ) ;
82
+ } ,
83
+ stop : function ( event , ui ) {
84
+ $mask . hide ( ) ;
85
+ } ,
67
86
resize : function ( event , ui ) {
68
87
$scope . w = ui . size . width * $scope . pxd ;
69
88
$scope . h = ui . size . height * $scope . pxd ;
70
- parent . $apply ( ) ;
89
+ parentScope . $apply ( ) ;
71
90
}
72
91
} ) ;
73
92
}
74
- }
93
+ } ;
75
94
} )
76
95
. directive ( 'rtKeyup' , function ( ) {
77
96
// Handle the onKeyUp event
@@ -83,7 +102,7 @@ angular
83
102
keyupHandler ( evt . which ) ;
84
103
} ) ;
85
104
} ) ;
86
- }
105
+ } ;
87
106
} )
88
107
. config ( function ( $httpProvider ) {
89
108
var numLoadings = 0 ;
You can’t perform that action at this time.
0 commit comments