1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Fix drag-inline behavior with pholio stage background

Summary: Currently, if you click and drag in the checkered background, we'll create a 1px-wide or 1px-tall inline comment. Don't start inlines unless the user clicks on the image itself.

Test Plan: Clicked on and off the image.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D5227
This commit is contained in:
epriestley 2013-03-05 12:29:03 -08:00
parent 7acaeee844
commit fdc30fc11b
3 changed files with 4 additions and 3 deletions

View file

@ -1891,7 +1891,7 @@ celerity_register_resource_map(array(
),
'javelin-behavior-pholio-mock-view' =>
array(
'uri' => '/res/a1c0c8ae/rsrc/js/application/pholio/behavior-pholio-mock-view.js',
'uri' => '/res/57c05b5f/rsrc/js/application/pholio/behavior-pholio-mock-view.js',
'type' => 'js',
'requires' =>
array(

View file

@ -68,10 +68,11 @@ final class PholioMockImagesView extends AphrontView {
$mockview = '';
$mock_wrapper = phutil_tag(
$mock_wrapper = javelin_tag(
'div',
array(
'id' => $viewport_id,
'sigil' => 'mock-viewport',
'class' => 'pholio-mock-image-viewport'
),
'');

View file

@ -194,7 +194,7 @@ JX.behavior('pholio-mock-view', function(config) {
select_image(config.selectedID);
JX.Stratcom.listen('mousedown', 'mock-panel', function(e) {
JX.Stratcom.listen('mousedown', 'mock-viewport', function(e) {
if (!e.isNormalMouseEvent()) {
return;
}