Skip to content

Commit

Permalink
Removed development leftovers and updated DefaultLayoutMergeStrategy …
Browse files Browse the repository at this point in the history
…description
  • Loading branch information
norberttech committed Dec 23, 2019
1 parent 8f359c6 commit 5994cca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
9 changes: 1 addition & 8 deletions src/StructurizrPHP/Core/Model/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,15 @@ public function setParent(Element $parent) : void
$this->parent = $parent;
}

// public function getCanonicalName() : string
// {
// return $this->parent->getCanonicalName() . self::CANONICAL_NAME_SEPARATOR . $this->formatForCanonicalName($this->getName());
// }

public function toArray() : array
{
$data = \array_merge(
return \array_merge(
[
'type' => $this->type,
'technology' => $this->technology,
],
parent::toArray()
);

return $data;
}

public static function hydrate(array $componentData, Model $model, ?Element $parent) : self
Expand Down
5 changes: 2 additions & 3 deletions src/StructurizrPHP/Core/View/DefaultLayoutMergeStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
*
* - Sets the paper size (if not set).
* - Copies element x,y positions.
* - Copies relationship vertices. - TODO
* - Copies relationship vertices.
*
* Elements are matched by the full canonical name. The downside of this approach is that if an element is renamed
* between versions of a workspace, it won't be possible to find/copy the layout information associated with an element.
* Elements are matched by id.
*/
final class DefaultLayoutMergeStrategy implements LayoutMergeStrategy
{
Expand Down

0 comments on commit 5994cca

Please sign in to comment.