Fix alignment and test

This commit is contained in:
Paulo Gustavo Veiga 2021-12-27 12:29:24 -08:00
parent db4052dcb6
commit d4d8bbc121
2 changed files with 6 additions and 4 deletions

View File

@ -1285,8 +1285,9 @@ class Topic extends NodeGraph {
}); });
// Adjust all topic elements positions ... // Adjust all topic elements positions ...
iconGroup.setPosition(padding, (topicHeight - iconHeight) / 2); const yPosition = Math.round((topicHeight - textHeight) / 2);
textShape.setPosition(padding + iconGroupWith + textIconSpacing, (topicHeight - textHeight) / 2); iconGroup.setPosition(padding, yPosition);
textShape.setPosition(padding + iconGroupWith + textIconSpacing, yPosition);
} else { } else {
// In case of images, the size is fixed ... // In case of images, the size is fixed ...
const size = this.getModel().getImageSize(); const size = this.getModel().getImageSize();

View File

@ -27,9 +27,10 @@
<option value="sample6">sample6</option> <option value="sample6">sample6</option>
<option value="sample7">sample7</option> <option value="sample7">sample7</option>
<option value="img-support">img-support</option> <option value="img-support">img-support</option>
<option value="error-on-load">welcome-reloaded</option> <option value="error-on-load">error-on-load</option>
<option value="complex">complex</option> <option value="complex">complex</option>
<option value="huge">complex</option> <option value="huge">huge</option>
<option value="icon-sample">icon-sample</option>
</select> </select>
</p> </p>
</div> </div>