@@ -70,7 +70,7 @@ describe('ClipPath.js', () => { | |||
it('sets the clip-path attribute on the element to the id of the clipPath', () => { | |||
const clip = new ClipPath().id('foo') | |||
const rect = new Rect().clipWith(clip) | |||
expect(rect.attr('clip-path')).toBe('url("#foo")') | |||
expect(rect.attr('clip-path')).toBe('url(#foo)') | |||
}) | |||
it('creates a clipPath and appends the passed element to it to clip current element', () => { | |||
@@ -78,7 +78,7 @@ describe('ClipPath.js', () => { | |||
const circle = canvas.circle(40) | |||
const rect = canvas.rect(100, 100).clipWith(circle) | |||
expect(circle.parent()).toEqual(any(ClipPath)) | |||
expect(rect.attr('clip-path')).toBe(`url("#${circle.parent().id()}")`) | |||
expect(rect.attr('clip-path')).toBe(`url(#${circle.parent().id()})`) | |||
}) | |||
}) | |||
@@ -77,7 +77,7 @@ describe('Gradient.js', () => { | |||
describe('url()', () => { | |||
it('returns url(#id)', () => { | |||
const gradient = new Gradient('linear').id('foo') | |||
expect(gradient.url()).toBe('url("#foo")') | |||
expect(gradient.url()).toBe('url(#foo)') | |||
}) | |||
}) | |||
@@ -71,7 +71,7 @@ describe('Mask.js', () => { | |||
it('sets the mask attribute on the element to the id of the maskPath', () => { | |||
const mask = new Mask().id('foo') | |||
const rect = new Rect().maskWith(mask) | |||
expect(rect.attr('mask')).toBe('url("#foo")') | |||
expect(rect.attr('mask')).toBe('url(#foo)') | |||
}) | |||
it('creates a maskPath and appends the passed element to it to mask current element', () => { | |||
@@ -79,7 +79,7 @@ describe('Mask.js', () => { | |||
const circle = canvas.circle(40) | |||
const rect = canvas.rect(100, 100).maskWith(circle) | |||
expect(circle.parent()).toEqual(any(Mask)) | |||
expect(rect.attr('mask')).toBe(`url("#${circle.parent().id()}")`) | |||
expect(rect.attr('mask')).toBe(`url(#${circle.parent().id()})`) | |||
}) | |||
}) | |||
@@ -70,7 +70,7 @@ describe('Pattern.js', () => { | |||
describe('url()', () => { | |||
it('returns url(#id)', () => { | |||
const pattern = new Pattern().id('foo') | |||
expect(pattern.url()).toBe('url("#foo")') | |||
expect(pattern.url()).toBe('url(#foo)') | |||
}) | |||
}) | |||
@@ -20,7 +20,7 @@ export default class ClipPath extends Container { | |||
} | |||
targets () { | |||
return baseFind('svg [clip-path*="' + this.id() + '"]') | |||
return baseFind('svg [clip-path*=' + this.id() + ']') | |||
} | |||
} | |||
@@ -44,7 +44,7 @@ registerMethods({ | |||
: this.parent().clip().add(element) | |||
// apply mask | |||
return this.attr('clip-path', 'url("#' + clipper.id() + '")') | |||
return this.attr('clip-path', 'url(#' + clipper.id() + ')') | |||
}, | |||
// Unclip element |
@@ -29,7 +29,7 @@ export default class Gradient extends Container { | |||
} | |||
targets () { | |||
return baseFind('svg [fill*="' + this.id() + '"]') | |||
return baseFind('svg [fill*=' + this.id() + ']') | |||
} | |||
// Alias string conversion to fill | |||
@@ -52,7 +52,7 @@ export default class Gradient extends Container { | |||
// Return the fill id | |||
url () { | |||
return 'url("#' + this.id() + '")' | |||
return 'url(#' + this.id() + ')' | |||
} | |||
} | |||
@@ -21,7 +21,7 @@ export default class Mask extends Container { | |||
} | |||
targets () { | |||
return baseFind('svg [mask*="' + this.id() + '"]') | |||
return baseFind('svg [mask*=' + this.id() + ']') | |||
} | |||
} | |||
@@ -21,7 +21,7 @@ export default class Pattern extends Container { | |||
} | |||
targets () { | |||
return baseFind('svg [fill*="' + this.id() + '"]') | |||
return baseFind('svg [fill*=' + this.id() + ']') | |||
} | |||
// Alias string conversion to fill | |||
@@ -44,7 +44,7 @@ export default class Pattern extends Container { | |||
// Return the fill id | |||
url () { | |||
return 'url("#' + this.id() + '")' | |||
return 'url(#' + this.id() + ')' | |||
} | |||
} |
@@ -97,7 +97,7 @@ registerMethods({ | |||
}) | |||
// Does not work in IE11. Use when IE support is dropped | |||
// return baseFind('svg textPath[*|href*="' + this.id() + '"]') | |||
// return baseFind('svg textPath[*|href*=' + this.id() + ']') | |||
} | |||
} | |||
}) |