-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for lines to and from objects
- Loading branch information
1 parent
c700e04
commit e613dde
Showing
16 changed files
with
403 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace MiroClipboard\Enums; | ||
|
||
enum WidgetSide | ||
{ | ||
case Top; | ||
case Bottom; | ||
case Left; | ||
case Right; | ||
|
||
public function pointForSide(float $offset = 0.5): array | ||
{ | ||
assert($offset >= 0, 'offset must be greater than or equal to 0'); | ||
assert($offset <= 1, 'offset must be less than or equal to 1'); | ||
|
||
return match ($this) { | ||
WidgetSide::Top => [ | ||
'x' => $offset, | ||
'y' => 0, | ||
], | ||
WidgetSide::Bottom => [ | ||
'x' => $offset, | ||
'y' => 1, | ||
], | ||
WidgetSide::Left => [ | ||
'x' => 0, | ||
'y' => $offset, | ||
], | ||
WidgetSide::Right => [ | ||
'x' => 1, | ||
'y' => $offset, | ||
], | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<span data-meta="<--(miro-data-v1)tl2dqpytn4SfXXVdoKmeqp+kqaJdZ12fnK+cXXW2Xaigr5xddZaYZ12qnaWgnq+uXXWWtl2kn111a2ddpKmkr6Scp4SfXXVda11nXa+0q6BddWxvZ12ypJ+ioK9/nK+cXXW2Xa+0q6BddV2uo5yroF1nXaWuqqlddbZdrqS1oF11tl2ypJ+vo111bGtrZ12joKSio69ddWxra7hnXZqrqq6kr6SqqV11tl2qoaGuoK+Ls111tl2zXXVrZ120XXVruLhnXa6enKegXXW2Xa6enKegXXVsuGddraCnnK+ksaCOnpynoF11bGddraqvnK+kqqlddbZdraqvnK+kqqlddWu4Z12toKecr6SxoI2qr5yvpKqpXXVrZ12rqq6kr6SqqV11tl2zXXVrZ120XXVruGddmqucraCpr111qbCnp2ddr6Czr111XV1nXa6vtKegXXVdtpddrq+XXXVuZ5ddrq6XXXVtZ5ddrp6XXXVscmxrcWxzZ5ddnZ6XXXVscXJsbHFza2eXXZ2ql111bGeXXZ2tnpdddWxwbG5tbnRrZ5ddna2yl111bWeXXZ2tqpdddWxnl12dra6XXXVtZ5ddoaGpl111l12Kq6CpjpyprpddZ5ddr56XXXVscHNycnRtcWeXXa+unpdddWxnl12vnJdddZddnpddZ5ddr5yxl111l12ol11nl12hrpdddW1vZ5ddnZdddamwp6dnl12kl111qbCnp2eXXbCXXXWpsKenZ5ddrpdddamwp6dnl12drp6XXXVsZ5ddkYCNl111l11taWyXXWeXXaOnl111qbCnp7hdZ12uo5yroF11XW5duLi4mLhnXaOqrq9ddV2opK2qaZ6qqF1nXbGgra6kqqlddW1nXaSui62qr6Cer6CfXXWhnKeuoLg=(/miro-data-v1)-->"></span> | ||
<span data-meta="<--(miro-data-v1)tl2dqpytn4SfXXVdoKmeqp+kqaJdZ12fnK+cXXW2Xaigr5xddZaYZ12qnaWgnq+uXXWWtl2kn111a2ddpKmkr6Scp4SfXXVda11nXa+0q6BddWxvZ12ypJ+ioK9/nK+cXXW2Xa+0q6BddV2uo5yroF1nXaWuqqlddbZdrqS1oF11tl2ypJ+vo111bGtrZ12joKSio69ddWxra7hnXZqrqq6kr6SqqV11tl2qoaGuoK+Ls111tl2zXXVrZ120XXVruLhnXa6enKegXXW2Xa6enKegXXVsuGddraCnnK+ksaCOnpynoF11bGddraqvnK+kqqlddbZdraqvnK+kqqlddWu4Z12toKecr6SxoI2qr5yvpKqpXXVrZ12rqq6kr6SqqV11tl2zXXVrZ120XXVruGddmqucraCpr111qbCnp2ddr6Czr111XV1nXa6vtKegXXVdtpddrq+XXXVuZ5ddrq6XXXVtZ5ddrp6XXXVscmxrcWxzZ5ddnZ6XXXVscXJsbHFza2eXXZ2ql111bGeXXZ2tnpdddWxwbG5tbnRrZ5ddna2yl111bWeXXZ2tqpdddWxnl12dra6XXXVtZ5ddoaGpl111l12Kq6CpjpyprpddZ5ddr56XXXVscmxrcWxzZ5ddr66el111bGeXXa+cl111l12el11nl12vnLGXXXWXXaiXXWeXXaGul111bW9nl12dl111qbCnp2eXXaSXXXWpsKenZ5ddsJdddamwp6dnl12ul111qbCnp2eXXZ2unpdddWxnl12RgI2XXXWXXW1pbJddZ5ddo6eXXXWpsKenuF1nXa6jnKugXXVdbl24uLiYuGddo6qur111XaikrappnqqoXWddsaCtrqSqqV11bWddpK6LraqvoJ6voJ9ddaGcp66guA==(/miro-data-v1)-->"></span> |
Oops, something went wrong.