mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Adding getBoundingClientRect math to getPos in Vector.js
Summary: Ref T4714, tooltips in fullscreen mode need special math, due to fixed position throwing off position of tooltips. Test Plan: Create work board, create several tasks, create several columns, drag tasks among columns and within columns. Create a paste, check tooltips in comment box show and are positioned correctly. Fullscreen comment box. Verify tooltips still show and position correctly. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T4714 Differential Revision: https://secure.phabricator.com/D8762
This commit is contained in:
parent
cb675a46a2
commit
8af84a9b7d
2 changed files with 32 additions and 25 deletions
|
@ -14,7 +14,7 @@ return array(
|
||||||
'differential.pkg.js' => '11a5b750',
|
'differential.pkg.js' => '11a5b750',
|
||||||
'diffusion.pkg.css' => '3783278d',
|
'diffusion.pkg.css' => '3783278d',
|
||||||
'diffusion.pkg.js' => '5b4010f4',
|
'diffusion.pkg.js' => '5b4010f4',
|
||||||
'javelin.pkg.js' => 'a10417f3',
|
'javelin.pkg.js' => '74a8353b',
|
||||||
'maniphest.pkg.css' => 'f1887d71',
|
'maniphest.pkg.css' => 'f1887d71',
|
||||||
'maniphest.pkg.js' => '2fe8af22',
|
'maniphest.pkg.js' => '2fe8af22',
|
||||||
'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
|
'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
|
||||||
|
@ -206,7 +206,7 @@ return array(
|
||||||
'rsrc/externals/javelin/lib/Request.js' => '23f9bb8d',
|
'rsrc/externals/javelin/lib/Request.js' => '23f9bb8d',
|
||||||
'rsrc/externals/javelin/lib/Resource.js' => '356de121',
|
'rsrc/externals/javelin/lib/Resource.js' => '356de121',
|
||||||
'rsrc/externals/javelin/lib/URI.js' => 'd9a9b862',
|
'rsrc/externals/javelin/lib/URI.js' => 'd9a9b862',
|
||||||
'rsrc/externals/javelin/lib/Vector.js' => '403a3dce',
|
'rsrc/externals/javelin/lib/Vector.js' => '039fb90d',
|
||||||
'rsrc/externals/javelin/lib/Workflow.js' => 'f28bf201',
|
'rsrc/externals/javelin/lib/Workflow.js' => 'f28bf201',
|
||||||
'rsrc/externals/javelin/lib/__tests__/Cookie.js' => '5ed109e8',
|
'rsrc/externals/javelin/lib/__tests__/Cookie.js' => '5ed109e8',
|
||||||
'rsrc/externals/javelin/lib/__tests__/DOM.js' => 'c984504b',
|
'rsrc/externals/javelin/lib/__tests__/DOM.js' => 'c984504b',
|
||||||
|
@ -379,7 +379,7 @@ return array(
|
||||||
'rsrc/js/application/files/behavior-icon-composer.js' => '8ef9ab58',
|
'rsrc/js/application/files/behavior-icon-composer.js' => '8ef9ab58',
|
||||||
'rsrc/js/application/files/behavior-launch-icon-composer.js' => '48086888',
|
'rsrc/js/application/files/behavior-launch-icon-composer.js' => '48086888',
|
||||||
'rsrc/js/application/harbormaster/behavior-reorder-steps.js' => '957a7fde',
|
'rsrc/js/application/harbormaster/behavior-reorder-steps.js' => '957a7fde',
|
||||||
'rsrc/js/application/herald/HeraldRuleEditor.js' => '6291cf4a',
|
'rsrc/js/application/herald/HeraldRuleEditor.js' => '22d2966a',
|
||||||
'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec',
|
'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec',
|
||||||
'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3',
|
'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3',
|
||||||
'rsrc/js/application/maniphest/behavior-batch-editor.js' => 'fe80fb6d',
|
'rsrc/js/application/maniphest/behavior-batch-editor.js' => 'fe80fb6d',
|
||||||
|
@ -522,7 +522,7 @@ return array(
|
||||||
'global-drag-and-drop-css' => '697324ad',
|
'global-drag-and-drop-css' => '697324ad',
|
||||||
'harbormaster-css' => 'cec833b7',
|
'harbormaster-css' => 'cec833b7',
|
||||||
'herald-css' => '59d48f01',
|
'herald-css' => '59d48f01',
|
||||||
'herald-rule-editor' => '6291cf4a',
|
'herald-rule-editor' => '22d2966a',
|
||||||
'herald-test-css' => '2b7d0f54',
|
'herald-test-css' => '2b7d0f54',
|
||||||
'inline-comment-summary-css' => '14a91639',
|
'inline-comment-summary-css' => '14a91639',
|
||||||
'javelin-aphlict' => '493665ee',
|
'javelin-aphlict' => '493665ee',
|
||||||
|
@ -656,7 +656,7 @@ return array(
|
||||||
'javelin-typeahead-static-source' => 'cdde23f1',
|
'javelin-typeahead-static-source' => 'cdde23f1',
|
||||||
'javelin-uri' => 'd9a9b862',
|
'javelin-uri' => 'd9a9b862',
|
||||||
'javelin-util' => '65b0b249',
|
'javelin-util' => '65b0b249',
|
||||||
'javelin-vector' => '403a3dce',
|
'javelin-vector' => '039fb90d',
|
||||||
'javelin-view' => '0f764c35',
|
'javelin-view' => '0f764c35',
|
||||||
'javelin-view-html' => 'e5b406f9',
|
'javelin-view-html' => 'e5b406f9',
|
||||||
'javelin-view-interpreter' => '0c33c1a0',
|
'javelin-view-interpreter' => '0c33c1a0',
|
||||||
|
@ -833,6 +833,11 @@ return array(
|
||||||
8 => 'javelin-stratcom',
|
8 => 'javelin-stratcom',
|
||||||
9 => 'javelin-util',
|
9 => 'javelin-util',
|
||||||
),
|
),
|
||||||
|
'039fb90d' =>
|
||||||
|
array(
|
||||||
|
0 => 'javelin-install',
|
||||||
|
1 => 'javelin-event',
|
||||||
|
),
|
||||||
'03d6ed07' =>
|
'03d6ed07' =>
|
||||||
array(
|
array(
|
||||||
0 => 'javelin-behavior',
|
0 => 'javelin-behavior',
|
||||||
|
@ -966,6 +971,16 @@ return array(
|
||||||
3 => 'javelin-workflow',
|
3 => 'javelin-workflow',
|
||||||
4 => 'javelin-util',
|
4 => 'javelin-util',
|
||||||
),
|
),
|
||||||
|
'22d2966a' =>
|
||||||
|
array(
|
||||||
|
0 => 'multirow-row-manager',
|
||||||
|
1 => 'javelin-install',
|
||||||
|
2 => 'javelin-util',
|
||||||
|
3 => 'javelin-dom',
|
||||||
|
4 => 'javelin-stratcom',
|
||||||
|
5 => 'javelin-json',
|
||||||
|
6 => 'phabricator-prefab',
|
||||||
|
),
|
||||||
'23f9bb8d' =>
|
'23f9bb8d' =>
|
||||||
array(
|
array(
|
||||||
0 => 'javelin-install',
|
0 => 'javelin-install',
|
||||||
|
@ -1049,11 +1064,6 @@ return array(
|
||||||
1 => 'javelin-dom',
|
1 => 'javelin-dom',
|
||||||
2 => 'phortune-credit-card-form',
|
2 => 'phortune-credit-card-form',
|
||||||
),
|
),
|
||||||
'403a3dce' =>
|
|
||||||
array(
|
|
||||||
0 => 'javelin-install',
|
|
||||||
1 => 'javelin-event',
|
|
||||||
),
|
|
||||||
'441f2137' =>
|
'441f2137' =>
|
||||||
array(
|
array(
|
||||||
0 => 'javelin-behavior',
|
0 => 'javelin-behavior',
|
||||||
|
@ -1189,15 +1199,12 @@ return array(
|
||||||
2 => 'javelin-util',
|
2 => 'javelin-util',
|
||||||
3 => 'phabricator-shaped-request',
|
3 => 'phabricator-shaped-request',
|
||||||
),
|
),
|
||||||
'6291cf4a' =>
|
'62e18640' =>
|
||||||
array(
|
array(
|
||||||
0 => 'multirow-row-manager',
|
0 => 'javelin-install',
|
||||||
1 => 'javelin-install',
|
1 => 'javelin-util',
|
||||||
2 => 'javelin-util',
|
2 => 'javelin-dom',
|
||||||
3 => 'javelin-dom',
|
3 => 'javelin-typeahead-normalizer',
|
||||||
4 => 'javelin-stratcom',
|
|
||||||
5 => 'javelin-json',
|
|
||||||
6 => 'phabricator-prefab',
|
|
||||||
),
|
),
|
||||||
'6453c869' =>
|
'6453c869' =>
|
||||||
array(
|
array(
|
||||||
|
@ -1232,13 +1239,6 @@ return array(
|
||||||
0 => 'javelin-behavior',
|
0 => 'javelin-behavior',
|
||||||
1 => 'javelin-dom',
|
1 => 'javelin-dom',
|
||||||
),
|
),
|
||||||
'62e18640' =>
|
|
||||||
array(
|
|
||||||
0 => 'javelin-install',
|
|
||||||
1 => 'javelin-util',
|
|
||||||
2 => 'javelin-dom',
|
|
||||||
3 => 'javelin-typeahead-normalizer',
|
|
||||||
),
|
|
||||||
'75903ee1' =>
|
'75903ee1' =>
|
||||||
array(
|
array(
|
||||||
0 => 'javelin-behavior',
|
0 => 'javelin-behavior',
|
||||||
|
|
7
webroot/rsrc/externals/javelin/lib/Vector.js
vendored
7
webroot/rsrc/externals/javelin/lib/Vector.js
vendored
|
@ -223,6 +223,13 @@ JX.install('Vector', {
|
||||||
getPos : function(node) {
|
getPos : function(node) {
|
||||||
JX.Event && (node instanceof JX.Event) && (node = node.getRawEvent());
|
JX.Event && (node instanceof JX.Event) && (node = node.getRawEvent());
|
||||||
|
|
||||||
|
if (node.getBoundingClientRect) {
|
||||||
|
var rect = node.getBoundingClientRect();
|
||||||
|
return new JX.Vector(
|
||||||
|
rect.left + window.pageXOffset,
|
||||||
|
rect.top + window.pageYOffset);
|
||||||
|
}
|
||||||
|
|
||||||
if (('pageX' in node) || ('clientX' in node)) {
|
if (('pageX' in node) || ('clientX' in node)) {
|
||||||
var c = JX.Vector._viewport;
|
var c = JX.Vector._viewport;
|
||||||
return new JX.Vector(
|
return new JX.Vector(
|
||||||
|
|
Loading…
Reference in a new issue