Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
fix(layout): use clientX/Y coordinates
Browse files Browse the repository at this point in the history
pageX/Y are relative to the html element when clientX/Y are relative to the viewport.
  • Loading branch information
douglasduteil committed Jan 1, 2014
1 parent 55ad525 commit a9e641d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/ui-layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ angular.module('ui.layout', [])

// Use relative mouse position
var isUsingColumnFlow = parentLayout.opts.flow === 'column';
var mouseProperty = ( isUsingColumnFlow ? 'pageX' : 'pageY');
var mouseProperty = ( isUsingColumnFlow ? 'clientX' : 'clientY');

// Use bounding box / css property names
var flowProperty = ( isUsingColumnFlow ? 'left' : 'top');
Expand Down

0 comments on commit a9e641d

Please sign in to comment.