aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2023-04-15 12:51:19 +0200
committerGitHub <noreply@github.com>2023-04-15 12:51:19 +0200
commitf10de7b61ce1acd3247a2060930e3be08dcf8b94 (patch)
tree2ea83d5d5bed92ae90b518f1ca539a9f9e049716
parent770ca58d58bcb48a52367e9a340ab06c0053f1d5 (diff)
parenta5268a8aab187a4d98190833923f0a80610007f8 (diff)
downloadsvg.js-f10de7b61ce1acd3247a2060930e3be08dcf8b94.tar.gz
svg.js-f10de7b61ce1acd3247a2060930e3be08dcf8b94.zip
Merge pull request #1297 from albert-github/feature/bug_spell
Spelling corrections
-rw-r--r--CHANGELOG.md4
-rw-r--r--spec/helpers.js4
-rw-r--r--spec/spec/animation/Controller.js2
-rw-r--r--spec/spec/animation/Runner.js26
-rw-r--r--spec/spec/animation/Timeline.js4
-rw-r--r--spec/spec/modules/core/event.js2
-rw-r--r--spec/spec/modules/core/regex.js8
-rw-r--r--spec/spec/modules/core/textable.js2
-rw-r--r--spec/spec/modules/optional/data.js2
-rw-r--r--spec/spec/types/PathArray.js2
-rw-r--r--src/animation/Runner.js14
-rw-r--r--src/animation/Timeline.js2
-rw-r--r--src/elements/Dom.js2
-rw-r--r--src/types/Box.js2
-rw-r--r--src/types/Matrix.js4
-rw-r--r--src/utils/adopter.js2
16 files changed, 41 insertions, 41 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 905a177..9b88c7a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -39,7 +39,7 @@ The document follows the conventions described in [“Keep a CHANGELOG”](http:
- fixed `replace()` which works without a parent now, too
- fixed `defs()` which correctly returns `null` when called on a detached node that is not a root node
- fixed `reference()` which correctly returns `null` instead of throwing when specifying an attribute which holds a number
- - fixed `flatten()` which correctly flattens now but doesnt accept parameters anymore (makes no sense)
+ - fixed `flatten()` which correctly flattens now but doesn't accept parameters anymore (makes no sense)
- fixed `ungroup()` which now inserts the elements at the correct position in the correct order and has position as second argument now
- fixed `position` for `transform()` to also allow a position of 0
- fixed `bbox()` of `PathArray` and `PointArray` which returns an instance of `Box` now
@@ -51,7 +51,7 @@ The document follows the conventions described in [“Keep a CHANGELOG”](http:
- fixed animate when=after to be really "now" when no runner is on the timeline
- fixed animate attr which is also retargetable now
- fixed internals of ObjectBag which can hold other Morphable values now
- - fixed animate transform which didnt change its origin on retarget for declaritive animations
+ - fixed animate transform which didnt change its origin on retarget for declarative animations
- fixed path parsing (#1145)
- fixed `clone()` to return the correct instance (#1154)
diff --git a/spec/helpers.js b/spec/helpers.js
index d6d1405..7d63dfa 100644
--- a/spec/helpers.js
+++ b/spec/helpers.js
@@ -124,7 +124,7 @@ export function buildFixtures () {
div.id = 'fixtures'
try {
- // FIXME: doesnt work in svgdom
+ // FIXME: doesn't work in svgdom
div.style.position = 'absolute'
div.style.top = 0
div.style.left = 0
@@ -142,7 +142,7 @@ export function buildCanvas () {
div.id = 'canvas'
try {
- // FIXME: doesnt work in svgdom
+ // FIXME: doesn't work in svgdom
div.style.position = 'absolute'
div.style.top = 0
div.style.left = 0
diff --git a/spec/spec/animation/Controller.js b/spec/spec/animation/Controller.js
index 2545235..8ad074d 100644
--- a/spec/spec/animation/Controller.js
+++ b/spec/spec/animation/Controller.js
@@ -394,7 +394,7 @@ describe('Controller.js', () => {
expect(pid.step(0, 100, 1000, {})).toBe(500)
})
- it('doesnt uses antiwindup if disabled', () => {
+ it('does not use antiwindup if disabled', () => {
const pid = new PID(0, 5, 0, false)
expect(pid.step(0, 100, 1000, {})).toBe(500000)
})
diff --git a/spec/spec/animation/Runner.js b/spec/spec/animation/Runner.js
index a56ac37..2512dac 100644
--- a/spec/spec/animation/Runner.js
+++ b/spec/spec/animation/Runner.js
@@ -150,7 +150,7 @@ describe('Runner.js', () => {
expect(runFn.calls.count()).toBe(2)
})
- it('calls initFn on every step if its declaritive', () => {
+ it('calls initFn on every step if its declarative', () => {
var runner = new Runner(new Controller())
runner.queue(initFn, runFn, true)
@@ -765,7 +765,7 @@ describe('Runner.js', () => {
expect(after.element()).toBe(element)
})
- it('doesnt reuse element if not set', () => {
+ it('does not reuse element if not set', () => {
const timeline = new Timeline()
const runner = new Runner().timeline(timeline)
const after = runner.animate()
@@ -878,7 +878,7 @@ describe('Runner.js', () => {
expect(runner.time()).toBe(0)
})
- it('doesnt reset if already reseted', () => {
+ it('does not reset if already reset', () => {
var runner = Object.freeze(new Runner().reset())
expect(runner.reset()).toBe(runner)
})
@@ -912,14 +912,14 @@ describe('Runner.js', () => {
expect(runner._history.x.morpher.to()).toEqual([ 20, '' ])
})
- it('throws away the morpher if it wasnt initialized yet and returns false', () => {
+ it('throws away the morpher if it was not initialized yet and returns false', () => {
const rect = new Rect().move(0, 0)
const runner = rect.animate().move(10, 10)
// In that case tryRetarget is not successful
expect(runner._tryRetarget('x', 20)).toBe(false)
})
- it('does nothing if method wasnt found', () => {
+ it('does nothing if method was not found', () => {
const rect = new Rect().move(0, 0)
const runner = rect.animate().move(10, 10)
jasmine.RequestAnimationFrame.tick(16)
@@ -953,18 +953,18 @@ describe('Runner.js', () => {
expect(runner._initialise(false)).toBe(undefined)
})
- it('does nothing if true is passed and runner is not declaritive', () => {
+ it('does nothing if true is passed and runner is not declarative', () => {
const runner = Object.freeze(new Runner())
expect(runner._initialise(true)).toBe(undefined)
})
- it('calls the initializer function on the queue when runner is declaritive', () => {
+ it('calls the initializer function on the queue when runner is declarative', () => {
const runner = new Runner(() => 0).queue(initFn, runFn)
runner._initialise()
expect(initFn).toHaveBeenCalledTimes(1)
})
- it('calls the initializer function on the queue when true is passed and runner is not declaritive', () => {
+ it('calls the initializer function on the queue when true is passed and runner is not declarative', () => {
const runner = new Runner().queue(initFn, runFn)
runner._initialise(true)
expect(initFn).toHaveBeenCalledTimes(1)
@@ -1300,7 +1300,7 @@ describe('Runner.js', () => {
})
describe('transform()', () => {
- it('does not retarget for non-declaritive transformations', () => {
+ it('does not retarget for non-declarative transformations', () => {
const runner = new Runner()
const spy = spyOn(runner, '_tryRetarget')
runner.transform({ translate: [ 10, 20 ] })
@@ -1314,7 +1314,7 @@ describe('Runner.js', () => {
expect(spy).not.toHaveBeenCalled()
})
- it('does retarget for absolute declaritive transformations', () => {
+ it('does retarget for absolute declarative transformations', () => {
const runner = new Runner(new Controller(() => 0))
const spy = spyOn(runner, '_tryRetarget')
runner.transform({ translate: [ 10, 20 ] })
@@ -1354,7 +1354,7 @@ describe('Runner.js', () => {
// transform sets its to-target to the morpher in the initialisation step
// because it depends on the from-target. Declaritive animation run the init-step
- // on every frame. Thats why we step here to see the effect of our retargeting
+ // on every frame. That is why we step here to see the effect of our retargeting
runner.step(25)
expect(runner._history.transform.morpher.to()).toEqual(
@@ -1371,7 +1371,7 @@ describe('Runner.js', () => {
// transform sets its to-target to the morpher in the initialisation step
// because it depends on the from-target. Declaritive animation run the init-step
- // on every frame. Thats why we step here to see the effect of our retargeting
+ // on every frame. That is why we step here to see the effect of our retargeting
runner.step(25)
expect(runner._history.transform.morpher.to()).toEqual(
@@ -1483,7 +1483,7 @@ describe('Runner.js', () => {
)
})
- it('correctly animates a declaritive relative rotation', () => {
+ it('correctly animates a declarative relative rotation', () => {
const element = new Rect()
const runner = new Runner(() => 1).element(element)
runner.transform({ rotate: 90 }, true)
diff --git a/spec/spec/animation/Timeline.js b/spec/spec/animation/Timeline.js
index 8cdf43f..5f511ff 100644
--- a/spec/spec/animation/Timeline.js
+++ b/spec/spec/animation/Timeline.js
@@ -117,7 +117,7 @@ describe('Timeline.js', () => {
expect(timeline._runners[0].start).toBe(200)
})
- it('schedules the runner as absolute if this runner wasnt on the timeline', () => {
+ it('schedules the runner as absolute if this runner was not on the timeline', () => {
const timeline = new Timeline()
const runner = new Runner(1000)
timeline.schedule(runner, 100, 'relative')
@@ -409,7 +409,7 @@ describe('Timeline.js', () => {
expect(spy).toHaveBeenCalled()
})
- it('doesnt run runners if they are not active', () => {
+ it('does not run runners if they are not active', () => {
const timeline = new Timeline()
const runner = new Runner(1000).active(false)
timeline.schedule(runner).play() // we have to play because its synchronous here
diff --git a/spec/spec/modules/core/event.js b/spec/spec/modules/core/event.js
index 44c0a0b..a395a4b 100644
--- a/spec/spec/modules/core/event.js
+++ b/spec/spec/modules/core/event.js
@@ -38,7 +38,7 @@ describe('event.js', () => {
expect(eventTarget.events).toEqual({})
})
- it('doesnt do anything if no event object is found on the instance', () => {
+ it('does not do anything if no event object is found on the instance', () => {
const eventTarget = new EventTarget()
delete eventTarget.events
clearEvents(eventTarget)
diff --git a/spec/spec/modules/core/regex.js b/spec/spec/modules/core/regex.js
index ddcebb9..5040fbd 100644
--- a/spec/spec/modules/core/regex.js
+++ b/spec/spec/modules/core/regex.js
@@ -49,17 +49,17 @@ describe('regex.js', () => {
expect(match[3]).toBe('56')
})
- /* it('doesnt matches without #', () => {
+ /* it('does not matches without #', () => {
const match = '123456'.match(regex.hex)
expect(match).toBe(null)
}) */
- it('doesnt matches other then 0-f #', () => {
+ it('does not matches other then 0-f #', () => {
const match = '#09afhz'.match(regex.hex)
expect(match).toBe(null)
})
- it('doesnt matches non full hex', () => {
+ it('does not matches non full hex', () => {
const match = '#aaa'.match(regex.hex)
expect(match).toBe(null)
})
@@ -73,7 +73,7 @@ describe('regex.js', () => {
expect(match[3]).toBe('56')
})
- it('doesnt match in the wrong format', () => {
+ it('does not match in the wrong format', () => {
expect('rgb( 12 , 34 , 56)'.match(regex.rgb)).toBe(null)
expect('12,34,56'.match(regex.rgb)).toBe(null)
expect('(12,34,56)'.match(regex.rgb)).toBe(null)
diff --git a/spec/spec/modules/core/textable.js b/spec/spec/modules/core/textable.js
index 1293575..c0a2100 100644
--- a/spec/spec/modules/core/textable.js
+++ b/spec/spec/modules/core/textable.js
@@ -244,7 +244,7 @@ describe('textable.js', () => {
it('restores the content from the dom with Tspan', () => {
// We create a new Tspan here because the one used before was part of text creation
- // and therefore is marked as newline and thats not what we want to test
+ // and therefore is marked as newline and that is not what we want to test
const tspan = new Tspan().plain('Just plain text!')
expect(tspan.text()).toBe('Just plain text!')
})
diff --git a/spec/spec/modules/optional/data.js b/spec/spec/modules/optional/data.js
index bdb1ca5..211fef3 100644
--- a/spec/spec/modules/optional/data.js
+++ b/spec/spec/modules/optional/data.js
@@ -72,7 +72,7 @@ describe('data.js', () => {
expect(rect.data('fill', 'string').attr('data-fill')).toBe('string')
})
- it('doesnt convert to json with third parameter true', () => {
+ it('does not convert to json with third parameter true', () => {
const rect = new Rect()
expect(rect.data('fill', { some: 'object' }, true).attr('data-fill')).toBe({}.toString())
})
diff --git a/spec/spec/types/PathArray.js b/spec/spec/types/PathArray.js
index ed26bc7..454252a 100644
--- a/spec/spec/types/PathArray.js
+++ b/spec/spec/types/PathArray.js
@@ -21,7 +21,7 @@ describe('PathArray.js', () => {
expect(arr.toString()).toBe('M0 0L100 100Z ')
})
- // this test is designed to cover a certain line but it doesnt work because of #608
+ // this test is designed to cover a certain line but it doesn't work because of #608
it('returns the valueOf when PathArray is given', () => {
const p = new PathArray('m10 10 h 80 v 80 h -80 l 300 400 z')
diff --git a/src/animation/Runner.js b/src/animation/Runner.js
index 5639f84..9d50042 100644
--- a/src/animation/Runner.js
+++ b/src/animation/Runner.js
@@ -50,7 +50,7 @@ export default class Runner extends EventTarget {
this._time = 0
this._lastTime = 0
- // At creation, the runner is in reseted state
+ // At creation, the runner is in reset state
this._reseted = true
// Save transforms applied to this runner
@@ -67,7 +67,7 @@ export default class Runner extends EventTarget {
this._frameId = null
- // Stores how long a runner is stored after beeing done
+ // Stores how long a runner is stored after being done
this._persist = this._isDeclarative ? true : null
}
@@ -345,7 +345,7 @@ export default class Runner extends EventTarget {
const declarative = this._isDeclarative
this.done = !declarative && !justFinished && this._time >= duration
- // Runner is running. So its not in reseted state anymore
+ // Runner is running. So its not in reset state anymore
this._reseted = false
let converged = false
@@ -459,7 +459,7 @@ export default class Runner extends EventTarget {
// do nothing and return false
_tryRetarget (method, target, extra) {
if (this._history[method]) {
- // if the last method wasnt even initialised, throw it away
+ // if the last method wasn't even initialised, throw it away
if (!this._history[method].caller.initialised) {
const index = this._queue.indexOf(this._history[method].caller)
this._queue.splice(index, 1)
@@ -639,7 +639,7 @@ registerMethods({
this._transformationRunners.add(runner)
// Make sure that the runner merge is executed at the very end of
- // all Animator functions. Thats why we use immediate here to execute
+ // all Animator functions. That is why we use immediate here to execute
// the merge right after all frames are run
Animator.cancelImmediate(this._frameId)
this._frameId = Animator.immediate(mergeTransforms.bind(this))
@@ -889,7 +889,7 @@ extend(Runner, {
_queueNumberDelta (method, to) {
to = new SVGNumber(to)
- // Try to change the target if we have this method already registerd
+ // Try to change the target if we have this method already registered
if (this._tryRetarget(method, to)) return this
// Make a morpher and queue the animation
@@ -912,7 +912,7 @@ extend(Runner, {
},
_queueObject (method, to) {
- // Try to change the target if we have this method already registerd
+ // Try to change the target if we have this method already registered
if (this._tryRetarget(method, to)) return this
// Make a morpher and queue the animation
diff --git a/src/animation/Timeline.js b/src/animation/Timeline.js
index 387b59b..3f81b66 100644
--- a/src/animation/Timeline.js
+++ b/src/animation/Timeline.js
@@ -239,7 +239,7 @@ export default class Timeline extends EventTarget {
this.fire('time', this._time)
// This is for the case that the timeline was seeked so that the time
- // is now before the startTime of the runner. Thats why we need to set
+ // is now before the startTime of the runner. That is why we need to set
// the runner to position 0
// FIXME:
diff --git a/src/elements/Dom.js b/src/elements/Dom.js
index d2ece97..e45c16c 100644
--- a/src/elements/Dom.js
+++ b/src/elements/Dom.js
@@ -167,7 +167,7 @@ export default class Dom extends EventTarget {
if (!type) return parent
- // loop trough ancestors if type is given
+ // loop through ancestors if type is given
do {
if (typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent
} while ((parent = adopt(parent.node.parentNode)))
diff --git a/src/types/Box.js b/src/types/Box.js
index f8976d4..ab19732 100644
--- a/src/types/Box.js
+++ b/src/types/Box.js
@@ -209,7 +209,7 @@ registerMethods({
// that means, their clientRect is always as big as the content.
// Furthermore this size is incorrect if the element is further transformed by its parents
// computedStyle: Only returns meaningful values if css was used with px. We dont go this route here!
- // getBBox: returns the bounding box of its content - that doesnt help!
+ // getBBox: returns the bounding box of its content - that doesn't help!
let { width, height } = this.attr([ 'width', 'height' ])
// Width and height is a string when a number with a unit is present which we can't use
diff --git a/src/types/Matrix.js b/src/types/Matrix.js
index 406cb84..c329df4 100644
--- a/src/types/Matrix.js
+++ b/src/types/Matrix.js
@@ -51,7 +51,7 @@ export default class Matrix {
const origin = new Point(o.origin || o.around || o.ox || o.originX, o.oy || o.originY)
const ox = origin.x
const oy = origin.y
- // We need Point to be invalid if nothing was passed because we cannot default to 0 here. Thats why NaN
+ // We need Point to be invalid if nothing was passed because we cannot default to 0 here. That is why NaN
const position = new Point(o.position || o.px || o.positionX || NaN, o.py || o.positionY || NaN)
const px = position.x
const py = position.y
@@ -435,7 +435,7 @@ export default class Matrix {
if (isFinite(t.px) || isFinite(t.py)) {
const origin = new Point(ox, oy).transform(transformer)
// TODO: Replace t.px with isFinite(t.px)
- // Doesnt work because t.px is also 0 if it wasnt passed
+ // Doesn't work because t.px is also 0 if it wasn't passed
const dx = isFinite(t.px) ? t.px - origin.x : 0
const dy = isFinite(t.py) ? t.py - origin.y : 0
transformer.translateO(dx, dy)
diff --git a/src/utils/adopter.js b/src/utils/adopter.js
index 487115c..7e1c85e 100644
--- a/src/utils/adopter.js
+++ b/src/utils/adopter.js
@@ -36,7 +36,7 @@ export function makeInstance (element, isHTML = false) {
// that the first char is < and thus an element
element = adopter(wrapper.firstChild)
- // make sure, that element doesnt have its wrapper attached
+ // make sure, that element doesn't have its wrapper attached
wrapper.removeChild(wrapper.firstChild)
return element
}