Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/plugin.js

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

4 changes: 2 additions & 2 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ let SimpleSVG = {
// prepare the classname without a dot at the beginning
let className = selectorToRemove.substring(1)

if (elements[i].classList.contains(className)) {
if (elements[i].classList.indexOf(className) > -1) {
// if an element has a class to be removed

// remove the class
Expand Down Expand Up @@ -169,7 +169,7 @@ let SimpleSVG = {
inlinedSVG.style.height = context.height
inlinedSVG.style.fill = context.fill
inlinedSVG.style.stroke = context.stroke
inlinedSVG.classList.add(myClassName) // add an additional class
inlinedSVG.setAttribute('class', myClassName); // add an additional class

context.$el.appendChild(inlinedSVG)

Expand Down