Skip to content

Commit eb8f43d

Browse files
authored
Update Rectangle.php
fix bug retangle whitout line style
1 parent d5edd3f commit eb8f43d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Rectangle.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ public function generate($obj = null) {
3535

3636
$dash = "";
3737
// dd($data);;
38-
if ($data->graphicElement->pen["lineStyle"] == "Dotted")
38+
$lineStyle = isset($data->graphicElement->pen["lineStyle"]) ? $data->graphicElement->pen["lineStyle"] : "Solid";
39+
if ($lineStyle == "Dotted")
3940
$dash = "0,1";
40-
elseif ($data->graphicElement->pen["lineStyle"] == "Dashed")
41+
elseif ($lineStyle == "Dashed")
4142
$dash = "4,2";
42-
elseif ($data->graphicElement->pen["lineStyle"] == "Solid")
43+
elseif ($lineStyle == "Solid")
4344
$dash = "";
4445
//echo "$borderwidth,";
4546

@@ -83,4 +84,4 @@ public function generate($obj = null) {
8384

8485
}
8586

86-
?>
87+
?>

0 commit comments

Comments
 (0)