Skip to content

Commit 9d2d15d

Browse files
authored
Fix lines not attaching with a square angle (#176)
Center node graphics around 0,0 (move evrything 25 units left) This works because the line attachement angles are calcualted as the angle between 0,0 and the attachement point (all coordinates relative to the node group).
1 parent f023ad1 commit 9d2d15d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/app/core/component/graph-display/graph-display.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,30 +197,30 @@ <h4 style="margin: 1em" *ngIf="showViewRelations">Pattern Language Relations</h4
197197
<rect data-click="nodeclick" data-link-handles="edges" height="50" rx="5" ry="5"
198198
style="stroke:black;stroke-width:1;"
199199
width="170"
200-
x="-60" y="-25">
200+
x="-85" y="-25">
201201
</rect>
202202
<!-- set both height and width values to define a maximum value for them -->
203-
<image height="35" width="35" x="-55" y="-17.5" data-click="iconUrl" data-href="iconUrl"></image>
203+
<image height="35" width="35" x="-80" y="-17.5" data-click="iconUrl" data-href="iconUrl"></image>
204204
<image *ngIf="enableDeletePattern" data-click="delete" data-content="patternLanguageId" class="node-action"
205-
width="10" x="80" y="-20" xlink:href="assets/delete.svg"/>
206-
<image data-click="info" data-content="patternLanguageId" width="10" x="95"
205+
width="10" x="55" y="-20" xlink:href="assets/delete.svg"/>
206+
<image data-click="info" data-content="patternLanguageId" width="10" x="70"
207207
xlink:href="assets/Info_Simple_bw.svg" class="node-action"
208208
y="-20"/>
209209
<text class="text" data-click="title" data-content="title" dominant-baseline="middle"
210210
height="50" text-anchor="middle" style="font-weight: bold"
211211
width="120"
212-
x="45"
212+
x="20"
213213
y="0">
214214
</text>
215215
<text class="text cursive" data-click="patternLanguageName" *ngIf="showPatternLanguageName"
216216
data-content="patternLanguageName"
217217
dominant-baseline="middle"
218218
height="50" text-anchor="middle"
219219
width="120"
220-
x="45"
220+
x="20"
221221
y="10">
222222
</text>
223-
<g class="concrete-solutions-container" transform="translate(-60,25)"></g>
223+
<g class="concrete-solutions-container" transform="translate(-85,25)"></g>
224224
</g>
225225

226226
<g data-line-attachement-point="-9 0" data-template-type="marker"

0 commit comments

Comments
 (0)