Skip to content

Commit a0241bf

Browse files
committed
More scaffolding for Link label displays
- Demo: Added option for enabling/disabling argument labels - Demo: Added bold font import for Nunito - Links: New CSS classes for controlling the look of Link labels - Links: New `Label` class for drawing various types of labels on or around Links. Includes an opaque rectangular background. - Config: Increased Link slot interval to accommodate argument labels
1 parent 60c207b commit a0241bf

File tree

16 files changed

+440
-140
lines changed

16 files changed

+440
-140
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: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,19 @@ <h5 class="modal-title" id="options-title">Options</h5>
187187
Show top links when moving words
188188
</label>
189189
</div>
190-
191190
<div class="custom-control custom-checkbox">
192191
<input type="checkbox" class="custom-control-input" id="tag-option-bottom-links-on-move">
193192
<label class="custom-control-label" for="tag-option-bottom-links-on-move">
194193
Show bottom links when moving words
195194
</label>
196195
</div>
196+
197+
<div class="custom-control custom-checkbox mt-3">
198+
<input type="checkbox" class="custom-control-input" id="tag-option-arg-labels">
199+
<label class="custom-control-label" for="tag-option-arg-labels">
200+
Show argument labels on links
201+
</label>
202+
</div>
197203
</div>
198204

199205
</div>

demo/src/demo.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,13 @@ $(async () => {
198198
);
199199
});
200200

201+
const $optionArgLabels = $("#tag-option-arg-labels");
202+
$optionArgLabels
203+
.prop("checked", uiTag.getOption("showArgLabels"))
204+
.on("change", () => {
205+
uiTag.setArgLabelVisibility($optionArgLabels[0].checked);
206+
});
207+
201208
// --------------------------------------------------------------------------
202209

203210
// The `.exportSvg()` function can be used to save the current

demo/src/demo.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
}
6464

6565
// Fonts used in the visualisation
66-
@import url("https://fonts.googleapis.com/css?family=Nunito:400,600");
66+
@import url("https://fonts.googleapis.com/css?family=Nunito:400,600,700");
6767

6868
svg, svg text {
6969
font-family: Nunito, futura, helvetica, arial, sans-serif;

dist/tag/css/tag.css

Lines changed: 16 additions & 2 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)