Commit 562a217b9976d5983593c973cfa3a33f9508e504
1 parent
5e8f0c52
Exists in
master
and in
53 other branches
ok pour lines no line
Showing
2 changed files
with
21 additions
and
5 deletions
Show diff stats
src/InputOutput/IHMImpl/ParamInfo/IHMInputOutputParamInfoClass.php
... | ... | @@ -484,8 +484,15 @@ class IHMInputOutputParamInfoClass implements InputOutputInterface |
484 | 484 | if (!empty($resolution)) |
485 | 485 | $result_array['serie-resolution'] = $resolution; |
486 | 486 | if ($drawNode->isLineDefined()) { |
487 | + $lineNode = $drawNode->getLine(); | |
488 | + $lineType = $lineNode->getType(); | |
489 | + if($lineType == RequestOutputPlotLineTypeEnum::NO){ | |
490 | + $result_array['serie-lines-activated'] = false; | |
491 | + } | |
492 | + else{ | |
487 | 493 | $result_array['serie-lines-activated'] = true; |
488 | 494 | $this->unmarshallLineData($drawNode->getLine(), "serie-lines-", $result_array); |
495 | + } | |
489 | 496 | } |
490 | 497 | |
491 | 498 | if ($drawNode->isSymbolDefined()) { |
... | ... | @@ -546,9 +553,17 @@ class IHMInputOutputParamInfoClass implements InputOutputInterface |
546 | 553 | } |
547 | 554 | |
548 | 555 | private function unmarshallLineData($lineNode, $prefix, &$result_array) { |
549 | - $result_array[$prefix.'style'] = $lineNode->getStyle(); | |
550 | - $result_array[$prefix.'width'] = $lineNode->getWidth(); | |
551 | - $result_array[$prefix.'color'] = $this->toHexColor($lineNode->getColor()); | |
556 | + $lineStyle = $lineNode->getStyle(); | |
557 | + if(!empty($lineStyle)) | |
558 | + $result_array[$prefix.'style'] = $lineStyle; | |
559 | + | |
560 | + $lineWidth = $lineNode->getWidth(); | |
561 | + if(!empty($lineWidth)) | |
562 | + $result_array[$prefix.'width'] = $lineWidth; | |
563 | + | |
564 | + $lineColor = $lineNode->getColor(); | |
565 | + if(!empty($lineColor)) | |
566 | + $result_array[$prefix.'color'] = $this->toHexColor($lineColor); | |
552 | 567 | } |
553 | 568 | |
554 | 569 | private function unmarshallSymbolData($symbolNode, $prefix, &$result_array) { | ... | ... |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotLineNodeClass.php
... | ... | @@ -6,6 +6,7 @@ abstract class RequestOutputPlotLineTypeEnum |
6 | 6 | { |
7 | 7 | const NO = "no"; |
8 | 8 | const LINE = "line"; |
9 | + const YES = "yes"; | |
9 | 10 | } |
10 | 11 | |
11 | 12 | /** |
... | ... | @@ -27,7 +28,7 @@ class RequestOutputPlotLineNodeClass extends RequestOutputPlotCurveNodeClass |
27 | 28 | |
28 | 29 | public function getType() |
29 | 30 | { |
30 | - $this->getAttribute(REQUESTOUTPUTPLOTLINE_TYPE); | |
31 | + return $this->getAttribute(REQUESTOUTPUTPLOTLINE_TYPE); | |
31 | 32 | } |
32 | 33 | |
33 | 34 | public function loadFromNode($xmlNode) |
... | ... | @@ -37,4 +38,4 @@ class RequestOutputPlotLineNodeClass extends RequestOutputPlotCurveNodeClass |
37 | 38 | } |
38 | 39 | } |
39 | 40 | |
40 | -?> | |
41 | 41 | \ No newline at end of file |
42 | +?> | ... | ... |