Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUISegmentBarSegmentView.php
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | protected function getTagAttributes() { | ||||
$width = ceil(100 * $width) / 100; | $width = ceil(100 * $width) / 100; | ||||
$width = sprintf('%.2f%%', $width); | $width = sprintf('%.2f%%', $width); | ||||
$left = 100 * $this->position; | $left = 100 * $this->position; | ||||
$left = floor(100 * $left) / 100; | $left = floor(100 * $left) / 100; | ||||
$left = sprintf('%.2f%%', $left); | $left = sprintf('%.2f%%', $left); | ||||
$tooltip = $this->tooltip; | $tooltip = $this->tooltip; | ||||
if (strlen($tooltip)) { | if (phutil_nonempty_string($tooltip)) { | ||||
Javelin::initBehavior('phabricator-tooltips'); | Javelin::initBehavior('phabricator-tooltips'); | ||||
$sigil = 'has-tooltip'; | $sigil = 'has-tooltip'; | ||||
$meta = array( | $meta = array( | ||||
'tip' => $tooltip, | 'tip' => $tooltip, | ||||
'align' => 'E', | 'align' => 'E', | ||||
); | ); | ||||
} else { | } else { | ||||
Show All 13 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0