Skip to content

Commit b14154c

Browse files
committed
Links: All labels drawn properly
- Demo: Separated label display options for top vs. bottom links - Links: Removed unnecessary colour overrides for label text - Links: Corrected and optimised event relation drawing code
1 parent aa6e622 commit b14154c

File tree

14 files changed

+463
-344
lines changed

14 files changed

+463
-344
lines changed

demo/demo.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/demo.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/demo.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/index.html

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,28 @@ <h5 class="modal-title" id="options-title">Options</h5>
195195
</div>
196196

197197
<div class="custom-control custom-checkbox mt-3">
198-
<input type="checkbox" class="custom-control-input" id="tag-option-main-label">
199-
<label class="custom-control-label" for="tag-option-main-label">
200-
Show main label on links
198+
<input type="checkbox" class="custom-control-input" id="tag-option-top-main-label">
199+
<label class="custom-control-label" for="tag-option-top-main-label">
200+
Show main label on top links
201201
</label>
202202
</div>
203203
<div class="custom-control custom-checkbox">
204-
<input type="checkbox" class="custom-control-input" id="tag-option-arg-labels">
205-
<label class="custom-control-label" for="tag-option-arg-labels">
206-
Show argument labels on links
204+
<input type="checkbox" class="custom-control-input" id="tag-option-top-arg-labels">
205+
<label class="custom-control-label" for="tag-option-top-arg-labels">
206+
Show argument labels on top links
207+
</label>
208+
</div>
209+
210+
<div class="custom-control custom-checkbox mt-3">
211+
<input type="checkbox" class="custom-control-input" id="tag-option-bottom-main-label">
212+
<label class="custom-control-label" for="tag-option-bottom-main-label">
213+
Show main label on bottom links
214+
</label>
215+
</div>
216+
<div class="custom-control custom-checkbox">
217+
<input type="checkbox" class="custom-control-input" id="tag-option-bottom-arg-labels">
218+
<label class="custom-control-label" for="tag-option-bottom-arg-labels">
219+
Show argument labels on bottom links
207220
</label>
208221
</div>
209222
</div>

demo/src/demo.js

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,18 +198,29 @@ $(async () => {
198198
);
199199
});
200200

201-
const $optionMainLabel = $("#tag-option-main-label");
202-
$optionMainLabel
203-
.prop("checked", uiTag.getOption("showMainLabel"))
201+
const $optionTopMainLabel = $("#tag-option-top-main-label");
202+
$optionTopMainLabel
203+
.prop("checked", uiTag.getOption("showTopMainLabel"))
204204
.on("change", () => {
205-
uiTag.setMainLabelVisibility($optionMainLabel[0].checked);
205+
uiTag.setTopMainLabelVisibility($optionTopMainLabel[0].checked);
206206
});
207-
208-
const $optionArgLabels = $("#tag-option-arg-labels");
209-
$optionArgLabels
210-
.prop("checked", uiTag.getOption("showArgLabels"))
207+
const $optionTopArgLabels = $("#tag-option-top-arg-labels");
208+
$optionTopArgLabels
209+
.prop("checked", uiTag.getOption("showTopArgLabels"))
210+
.on("change", () => {
211+
uiTag.setTopArgLabelVisibility($optionTopArgLabels[0].checked);
212+
});
213+
const $optionBottomMainLabel = $("#tag-option-bottom-main-label");
214+
$optionBottomMainLabel
215+
.prop("checked", uiTag.getOption("showBottomMainLabel"))
216+
.on("change", () => {
217+
uiTag.setBottomMainLabelVisibility($optionBottomMainLabel[0].checked);
218+
});
219+
const $optionBottomArgLabels = $("#tag-option-bottom-arg-labels");
220+
$optionBottomArgLabels
221+
.prop("checked", uiTag.getOption("showBottomArgLabels"))
211222
.on("change", () => {
212-
uiTag.setArgLabelVisibility($optionArgLabels[0].checked);
223+
uiTag.setBottomArgLabelVisibility($optionBottomArgLabels[0].checked);
213224
});
214225

215226
// --------------------------------------------------------------------------

dist/tag/css/tag.css

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tag/css/tag.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tag/css/tag.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tag/css/tag.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)