File tree Expand file tree Collapse file tree 2 files changed +8
-22
lines changed Expand file tree Collapse file tree 2 files changed +8
-22
lines changed Original file line number Diff line number Diff line change 1
- /* Stellar.js v0.2.2
1
+ /* Stellar.js v0.2.3
2
2
* Copyright 2012, Mark Dalgleish
3
3
*
4
4
* This content is released under the MIT License
221
221
verticalOffset ,
222
222
positionLeft ,
223
223
positionTop ,
224
+ marginLeft ,
225
+ marginTop ,
224
226
$offsetParent ,
225
227
offsetLeft ,
226
228
offsetTop ,
250
252
positionLeft = $this . position ( ) . left ;
251
253
positionTop = $this . position ( ) . top ;
252
254
253
- // Catch-all for margin left properties (this evaluates to 'auto' in IE7 and IE8)
254
- if ( $this . css ( 'margin-left' ) == "auto" )
255
- {
256
- marginLeft = parseInt ( "0px" , 10 ) ;
257
- }
258
- else
259
- {
260
- marginLeft = parseInt ( $this . css ( 'margin-left' ) , 10 ) ;
261
- }
262
-
263
- // Catch-all for margin top properties (this evaluates to 'auto' in IE7 and IE8)
264
- if ( $this . css ( 'margin-top' ) == "auto" )
265
- {
266
- marginTop = parseInt ( "0px" , 10 ) ;
267
- }
268
- else
269
- {
270
- marginTop = parseInt ( $this . css ( 'margin-top' ) , 10 ) ;
271
- }
255
+ // Catch-all for margin top/left properties (these evaluate to 'auto' in IE7 and IE8)
256
+ marginLeft = ( $this . css ( 'margin-left' ) === 'auto' ) ? 0 : parseInt ( $this . css ( 'margin-left' ) , 10 ) ;
257
+ marginTop = ( $this . css ( 'margin-top' ) === 'auto' ) ? 0 : parseInt ( $this . css ( 'margin-top' ) , 10 ) ;
272
258
273
259
offsetLeft = $this . offset ( ) . left - marginLeft ;
274
260
offsetTop = $this . offset ( ) . top - marginTop ;
You can’t perform that action at this time.
0 commit comments