Page MenuHomePhabricator

D12759.diff
No OneTemporary

D12759.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -8,7 +8,7 @@
return array(
'names' => array(
'core.pkg.css' => 'ca3f6a60',
- 'core.pkg.js' => '5a18f0ab',
+ 'core.pkg.js' => 'dcd6c8e3',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => 'bb338e4b',
'differential.pkg.js' => '895b8d62',
@@ -436,7 +436,7 @@
'rsrc/js/core/DragAndDropFileUpload.js' => '07de8873',
'rsrc/js/core/DraggableList.js' => 'a16ec1c6',
'rsrc/js/core/FileUpload.js' => '477359c8',
- 'rsrc/js/core/Hovercard.js' => '7e8468ae',
+ 'rsrc/js/core/Hovercard.js' => '14ac66f5',
'rsrc/js/core/KeyboardShortcut.js' => '1ae869f2',
'rsrc/js/core/KeyboardShortcutManager.js' => 'c1700f6f',
'rsrc/js/core/MultirowRowManager.js' => 'b5d57730',
@@ -724,7 +724,7 @@
'phabricator-file-upload' => '477359c8',
'phabricator-filetree-view-css' => 'fccf9f82',
'phabricator-flag-css' => '5337623f',
- 'phabricator-hovercard' => '7e8468ae',
+ 'phabricator-hovercard' => '14ac66f5',
'phabricator-hovercard-view-css' => '44394670',
'phabricator-keyboard-shortcut' => '1ae869f2',
'phabricator-keyboard-shortcut-manager' => 'c1700f6f',
@@ -913,6 +913,13 @@
'javelin-json',
'phabricator-draggable-list',
),
+ '14ac66f5' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'javelin-vector',
+ 'javelin-request',
+ 'javelin-uri',
+ ),
'14d7a8b8' => array(
'javelin-behavior',
'javelin-behavior-device',
@@ -1410,13 +1417,6 @@
'7e41274a' => array(
'javelin-install',
),
- '7e8468ae' => array(
- 'javelin-install',
- 'javelin-dom',
- 'javelin-vector',
- 'javelin-request',
- 'javelin-uri',
- ),
'7ebaeed3' => array(
'herald-rule-editor',
'javelin-behavior',
diff --git a/webroot/rsrc/js/core/Hovercard.js b/webroot/rsrc/js/core/Hovercard.js
--- a/webroot/rsrc/js/core/Hovercard.js
+++ b/webroot/rsrc/js/core/Hovercard.js
@@ -80,6 +80,7 @@
var p = JX.$V(root);
var d = JX.Vector.getDim(root);
var n = JX.Vector.getDim(child);
+ var v = JX.Vector.getViewport();
// Move the tip so it's nicely aligned.
// I'm just doing north/south alignment for now
@@ -89,8 +90,12 @@
var x = parseInt(p.x, 10) - margin / 2;
var y = parseInt(p.y - n.y, 10) - margin;
+ // If running off the edge of the viewport, make it margin / 2 away
+ // from the far right edge of the viewport instead
+ if ((x + n.x) > (v.x)) {
+ x = x - parseInt(x + n.x - v.x + margin / 2, 10);
// If more in the center, we can safely center
- if (x > (n.x / 2) + margin) {
+ } else if (x > (n.x / 2) + margin) {
x = parseInt(p.x - (n.x / 2) + d.x, 10);
}

File Metadata

Mime Type
text/plain
Expires
May 9 2024, 7:58 PM (5 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6276187
Default Alt Text
D12759.diff (2 KB)

Event Timeline