Skip to content

Commit

Permalink
Merge pull request #11 from hamidafghan/ifix-stroke-width
Browse files Browse the repository at this point in the history
Added stroke width customization
  • Loading branch information
asantibanez authored Nov 30, 2020
2 parents 8b0bb9c + c61ca90 commit 230b706
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Models/HasStroke.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
trait HasStroke
{
private $stroke;
private $width;

public function initStroke()
{
Expand All @@ -17,6 +18,7 @@ private function defaultStroke()
{
return [
'curve' => 'straight',
'width' => 4
];
}

Expand All @@ -34,6 +36,13 @@ public function setStraightCurve()
return $this;
}

public function setStrokeWidth($width)
{
data_set($this->stroke, 'width', $width);

return $this;
}

protected function strokeToArray()
{
return [
Expand Down

0 comments on commit 230b706

Please sign in to comment.