Skip to content

Commit

Permalink
Release v0.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikr committed Mar 21, 2019
1 parent 4eef193 commit 1bf5f69
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions dist/chartist-plugin-threshold.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,18 @@
) {
// Cloning the original line path, mask it with the upper mask rect above the threshold and add the
// class for above threshold
// Ensure the cloned path is added as the first element of the parent node
// Ref for `elem()`: https://github.com/gionkunz/chartist-js/blob/master/src/scripts/svg.js#L94
data.element
.parent()
.elem(data.element._node.cloneNode(true))
.elem(data.element._node.cloneNode(true), {}, '', true)
.attr({
mask: 'url(#' + options.maskNames.aboveThresholdID + ')'
})
.addClass(options.classNames.aboveThreshold);

// Use the original line path, mask it with the lower mask rect below the threshold and add the class
// for blow threshold
// for below threshold
data.element
.attr({
mask: 'url(#' + options.maskNames.belowThresholdID + ')'
Expand Down
6 changes: 3 additions & 3 deletions dist/chartist-plugin-threshold.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1bf5f69

Please sign in to comment.