Changeset 1275
- Timestamp:
- 2008-01-09 08:55:28 (6 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/branches/features/floating_dialog/editor/fckdialog.html
r1268 r1275 279 279 var lastCoords = null ; 280 280 281 var getMouseCoordinates = function( evt )282 {283 var element = evt.srcElement || evt.target ;284 var doc = FCKTools.GetElementDocument( element ) ;285 var view = doc.parentWindow || evt.view ;286 var retval = { 'x': evt.clientX, 'y': evt.clientY };287 288 if ( view != Args().TopWindow )289 {290 var offset = FCKTools.GetDocumentPosition( Args().TopWindow, doc.documentElement ) ;291 retval.x += offset.x ;292 retval.y += offset.y ;293 }294 295 return retval ;296 }297 298 281 var cleanUpHandlers = function() 299 282 { … … 310 293 return ; 311 294 312 // Debouncing logic for Opera, for preventing the dialog from vibrating during mouse drags.313 if ( FCKBrowserInfo.IsOpera )314 {315 if ( window.LastMoveTimestamp > (new Date()).getTime() - 20 )316 return ;317 else318 window.LastMoveTimestamp = (new Date()).getTime() ;319 }320 321 295 if ( !evt ) 322 296 evt = FCKTools.GetElementDocument( this ).parentWindow.event ; 323 297 324 var currentCoords = getMouseCoordinates( evt );298 var currentCoords = {'x' : evt.screenX, 'y' : evt.screenY}; 325 299 var dx = currentCoords.x - lastCoords.x; 326 300 var dy = currentCoords.y - lastCoords.y; … … 368 342 return ; 369 343 370 lastCoords = getMouseCoordinates( evt );344 lastCoords = {'x' : evt.screenX, 'y' : evt.screenY} ; 371 345 372 346 for ( var i = 0 ; i < registeredWindows.length ; i++ )