Commit a88159f7ebcedd4f872c69d2a6aa83c4afd3ee27
1 parent
063337d8
Exists in
master
and in
66 other branches
Add panel index support
Showing
2 changed files
with
14 additions
and
0 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
@@ -376,6 +376,9 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | @@ -376,6 +376,9 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | ||
376 | if (isset($panelData->{'id'})) | 376 | if (isset($panelData->{'id'})) |
377 | $panelNode->setId($panelData->{'id'}); | 377 | $panelNode->setId($panelData->{'id'}); |
378 | 378 | ||
379 | + if (isset($panelData->{'panel-index'})) | ||
380 | + $panelNode->setIndex($panelData->{'panel-index'}); | ||
381 | + | ||
379 | //Panel background color | 382 | //Panel background color |
380 | if (($panelData->{'panel-background-color'} != 'none') && ($panelData->{'panel-background-color'} != '')) | 383 | if (($panelData->{'panel-background-color'} != 'none') && ($panelData->{'panel-background-color'} != '')) |
381 | $panelNode->setBackgroundColor($this->hexColor2KernelColor($panelData->{'panel-background-color'})); | 384 | $panelNode->setBackgroundColor($this->hexColor2KernelColor($panelData->{'panel-background-color'})); |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotPanelNodeClass.php
@@ -15,6 +15,7 @@ define ("REQUESTOUTPUTPLOTPANEL_XMARGIN", "xMargin"); | @@ -15,6 +15,7 @@ define ("REQUESTOUTPUTPLOTPANEL_XMARGIN", "xMargin"); | ||
15 | define ("REQUESTOUTPUTPLOTPANEL_PREFEREDWIDTH", "preferedWidth"); | 15 | define ("REQUESTOUTPUTPLOTPANEL_PREFEREDWIDTH", "preferedWidth"); |
16 | define ("REQUESTOUTPUTPLOTPANEL_PREFEREDHEIGHT", "preferedHeight"); | 16 | define ("REQUESTOUTPUTPLOTPANEL_PREFEREDHEIGHT", "preferedHeight"); |
17 | define ("REQUESTOUTPUTPLOTPANEL_ID", "id"); | 17 | define ("REQUESTOUTPUTPLOTPANEL_ID", "id"); |
18 | +define ("REQUESTOUTPUTPLOTPANEL_INDEX", "index"); | ||
18 | 19 | ||
19 | abstract class RequestOutputPlotElementTypeEnum | 20 | abstract class RequestOutputPlotElementTypeEnum |
20 | { | 21 | { |
@@ -156,6 +157,16 @@ class RequestOutputPlotPanelNodeClass extends NodeClass | @@ -156,6 +157,16 @@ class RequestOutputPlotPanelNodeClass extends NodeClass | ||
156 | return $this->getAttribute(REQUESTOUTPUTPLOTPANEL_ID); | 157 | return $this->getAttribute(REQUESTOUTPUTPLOTPANEL_ID); |
157 | } | 158 | } |
158 | 159 | ||
160 | + public function setIndex($index) | ||
161 | + { | ||
162 | + $this->setAttribute(REQUESTOUTPUTPLOTPANEL_INDEX, $index); | ||
163 | + } | ||
164 | + | ||
165 | + public function getIndex() | ||
166 | + { | ||
167 | + return $this->getAttribute(REQUESTOUTPUTPLOTPANEL_INDEX); | ||
168 | + } | ||
169 | + | ||
159 | public function loadFromNode($xmlNode) | 170 | public function loadFromNode($xmlNode) |
160 | { | 171 | { |
161 | $this->setBackgroundColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANEL_BACKGROUNDCOLOR)); | 172 | $this->setBackgroundColor($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOTPANEL_BACKGROUNDCOLOR)); |