summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/spec/elements/Path.js9
-rw-r--r--src/elements/Path.js5
-rw-r--r--src/elements/TextPath.js2
3 files changed, 1 insertions, 15 deletions
diff --git a/spec/spec/elements/Path.js b/spec/spec/elements/Path.js
index e388fdb..d43857e 100644
--- a/spec/spec/elements/Path.js
+++ b/spec/spec/elements/Path.js
@@ -132,15 +132,6 @@ describe('Path.js', () => {
})
})
- describe('targets()', () => {
- it('gets all targets of this path', () => {
- const canvas = SVG().addTo(container)
- const path = canvas.path('M0 0 50, 50')
- const textPath = canvas.text('Hello World').path(path)
- expect(path.targets()).toEqual([ textPath ])
- })
- })
-
describe('width()', () => {
it('gets the width of the path', () => {
const canvas = SVG().addTo(container)
diff --git a/src/elements/Path.js b/src/elements/Path.js
index 018a8c6..ae2fac6 100644
--- a/src/elements/Path.js
+++ b/src/elements/Path.js
@@ -3,7 +3,6 @@ import { proportionalSize } from '../utils/utils.js'
import { registerMethods } from '../utils/methods.js'
import PathArray from '../types/PathArray.js'
import Shape from './Shape.js'
-import baseFind from '../modules/core/selector.js'
export default class Path extends Shape {
// Initialize node
@@ -44,10 +43,6 @@ export default class Path extends Shape {
return this.attr('d', this.array().size(p.width, p.height))
}
- targets () {
- return baseFind('svg textpath [href*="' + this.id() + '"]')
- }
-
// Set width of element
width (width) {
return width == null ? this.bbox().width : this.size(width, this.bbox().height)
diff --git a/src/elements/TextPath.js b/src/elements/TextPath.js
index fde8131..e4208c2 100644
--- a/src/elements/TextPath.js
+++ b/src/elements/TextPath.js
@@ -92,7 +92,7 @@ registerMethods({
}),
targets () {
- return baseFind('svg [*|href*="' + this.id() + '"]')
+ return baseFind('svg textPath[*|href*="' + this.id() + '"]')
}
}
})