1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 17:22:42 +01:00
phorge-phorge/src/view/phui/PHUIWorkboardView.php
epriestley d78061d820 Only prevent drag-scroll in the Y direction on workboards
Summary: This scroll lock thing prevented both X and Y scrolling, but should only prevent Y scrolling. Dragging a card to the edge to scroll left/right is fine.

Test Plan: Scrolled a workboard left/right by dragging a card to the edge.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15213
2016-02-08 10:05:39 -08:00

38 lines
841 B
PHP

<?php
final class PHUIWorkboardView extends AphrontTagView {
private $panels = array();
private $actions = array();
public function addPanel(PHUIWorkpanelView $panel) {
$this->panels[] = $panel;
return $this;
}
protected function getTagAttributes() {
return array(
'class' => 'phui-workboard-view',
);
}
protected function getTagContent() {
require_celerity_resource('phui-workboard-view-css');
$view = new AphrontMultiColumnView();
$view->setGutter(AphrontMultiColumnView::GUTTER_MEDIUM);
foreach ($this->panels as $panel) {
$view->addColumn($panel);
}
$board = javelin_tag(
'div',
array(
'class' => 'phui-workboard-view-shadow',
'sigil' => 'workboard-shadow lock-scroll-y-while-dragging',
),
$view);
return $board;
}
}