aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Gates <tim.gates@iress.com>2023-04-05 21:12:10 +1000
committerTim Gates <tim.gates@iress.com>2023-04-05 21:12:10 +1000
commitd3630aa69816e78a274e5b18dd1e027aa8a7e6ec (patch)
tree6d60e71adf69fdb7b59534d4a2d4137d5d124a88
parentd8ce1aec598e36457c0bb7e923cf5642420ceb86 (diff)
downloadsvg.js-d3630aa69816e78a274e5b18dd1e027aa8a7e6ec.tar.gz
svg.js-d3630aa69816e78a274e5b18dd1e027aa8a7e6ec.zip
docs: Fix a few typos
There are small typos in: - spec/spec/animation/Runner.js - src/animation/Runner.js - src/animation/Timeline.js Fixes: - Should read `successful` rather than `successfull`. - Should read `transforms` rather than `tranforms`. - Should read `resetting` rather than `reseting`. - Should read `overwrite` rather than `overwfrite`. - Should read `morpher` rather than `morepher`. - Should read `declarative` rather than `declaritive`. Signed-off-by: Tim Gates <tim.gates@iress.com>
-rw-r--r--spec/spec/animation/Runner.js22
-rw-r--r--src/animation/Runner.js6
-rw-r--r--src/animation/Timeline.js6
3 files changed, 17 insertions, 17 deletions
diff --git a/spec/spec/animation/Runner.js b/spec/spec/animation/Runner.js
index b9a6342..a56ac37 100644
--- a/spec/spec/animation/Runner.js
+++ b/spec/spec/animation/Runner.js
@@ -915,7 +915,7 @@ describe('Runner.js', () => {
it('throws away the morpher if it wasnt 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 successfull
+ // In that case tryRetarget is not successful
expect(runner._tryRetarget('x', 20)).toBe(false)
})
@@ -923,7 +923,7 @@ describe('Runner.js', () => {
const rect = new Rect().move(0, 0)
const runner = rect.animate().move(10, 10)
jasmine.RequestAnimationFrame.tick(16)
- // In that case tryRetarget is not successfull
+ // In that case tryRetarget is not successful
expect(runner._tryRetarget('foo', 20)).toBe(false)
})
@@ -931,11 +931,11 @@ describe('Runner.js', () => {
const rect = new Rect()
const runner = rect.animate(new Controller(() => 0)).transform({ translate: [ 10, 10 ] })
jasmine.RequestAnimationFrame.tick(16)
- // In that case tryRetarget is not successfull
+ // In that case tryRetarget is not successful
expect(runner._tryRetarget('transform', { translate: [ 20, 20 ] })).toBe(true)
})
- it('starts the timeline if retarget was successfull', () => {
+ it('starts the timeline if retarget was successful', () => {
const timeline = new Timeline()
const rect = new Rect().move(0, 0).timeline(timeline)
const runner = rect.animate().move(10, 10)
@@ -1334,7 +1334,7 @@ describe('Runner.js', () => {
runner.transform({ translate: [ 10, 20 ], scale: 2, rotate: 90 })
runner.step(50)
// transform sets an immediate callback to apply all merged transforms
- // when every runner had the chance to add its bit of tranforms
+ // when every runner had the chance to add its bit of transforms
jasmine.RequestAnimationFrame.tick(1)
expect(element.matrix().decompose()).toEqual(objectContaining({
translateX: 5,
@@ -1385,7 +1385,7 @@ describe('Runner.js', () => {
runner.translate(10, 20).scale(2).rotate(45)
runner.step(50)
// transform sets an immediate callback to apply all merged transforms
- // when every runner had the chance to add its bit of tranforms
+ // when every runner had the chance to add its bit of transforms
jasmine.RequestAnimationFrame.tick(1)
// The origin is transformed with every
@@ -1406,7 +1406,7 @@ describe('Runner.js', () => {
runner2.step(50)
runner3.step(50)
// transform sets an immediate callback to apply all merged transforms
- // when every runner had the chance to add its bit of tranforms
+ // when every runner had the chance to add its bit of transforms
jasmine.RequestAnimationFrame.tick(1)
// The origin is transformed with every
@@ -1427,7 +1427,7 @@ describe('Runner.js', () => {
runner2.step(50)
runner3.step(50)
// transform sets an immediate callback to apply all merged transforms
- // when every runner had the chance to add its bit of tranforms
+ // when every runner had the chance to add its bit of transforms
jasmine.RequestAnimationFrame.tick(1)
expect(runner1._queue.length).toBe(0)
@@ -1444,7 +1444,7 @@ describe('Runner.js', () => {
runner.transform(new Matrix({ rotate: 90 }))
runner.step(50)
// transform sets an immediate callback to apply all merged transforms
- // when every runner had the chance to add its bit of tranforms
+ // when every runner had the chance to add its bit of transforms
jasmine.RequestAnimationFrame.tick(1)
// The origin is transformed with every
@@ -1459,7 +1459,7 @@ describe('Runner.js', () => {
runner.transform(Object.assign({ affine: true }, new Matrix({ rotate: 90 })))
runner.step(50)
// transform sets an immediate callback to apply all merged transforms
- // when every runner had the chance to add its bit of tranforms
+ // when every runner had the chance to add its bit of transforms
jasmine.RequestAnimationFrame.tick(1)
// The origin is transformed with every
@@ -1474,7 +1474,7 @@ describe('Runner.js', () => {
runner.transform(new Matrix({ rotate: 90 }), true, true)
runner.step(50)
// transform sets an immediate callback to apply all merged transforms
- // when every runner had the chance to add its bit of tranforms
+ // when every runner had the chance to add its bit of transforms
jasmine.RequestAnimationFrame.tick(1)
// The origin is transformed with every
diff --git a/src/animation/Runner.js b/src/animation/Runner.js
index cf18201..5639f84 100644
--- a/src/animation/Runner.js
+++ b/src/animation/Runner.js
@@ -360,7 +360,7 @@ export default class Runner extends EventTarget {
this.fire('step', this)
}
// correct the done flag here
- // declaritive animations itself know when they converged
+ // declarative animations itself know when they converged
this.done = this.done || (converged && declarative)
if (justFinished) {
this.fire('finished', this)
@@ -619,7 +619,7 @@ registerMethods({
// this function searches for all runners on the element and deletes the ones
// which run before the current one. This is because absolute transformations
- // overwfrite anything anyway so there is no need to waste time computing
+ // overwrite anything anyway so there is no need to waste time computing
// other runners
_clearTransformRunnersBefore (currentRunner) {
this._transformationRunners.clearBefore(currentRunner.id)
@@ -769,7 +769,7 @@ extend(Runner, {
? transforms.affine
: (affine != null ? affine : !isMatrix)
- // Create a morepher and set its type
+ // Create a morpher and set its type
const morpher = new Morphable(this._stepper)
.type(affine ? TransformBag : Matrix)
diff --git a/src/animation/Timeline.js b/src/animation/Timeline.js
index 928c334..387b59b 100644
--- a/src/animation/Timeline.js
+++ b/src/animation/Timeline.js
@@ -243,12 +243,12 @@ export default class Timeline extends EventTarget {
// the runner to position 0
// FIXME:
- // However, reseting in insertion order leads to bugs. Considering the case,
+ // However, resetting in insertion order leads to bugs. Considering the case,
// where 2 runners change the same attribute but in different times,
- // reseting both of them will lead to the case where the later defined
+ // resetting both of them will lead to the case where the later defined
// runner always wins the reset even if the other runner started earlier
// and therefore should win the attribute battle
- // this can be solved by reseting them backwards
+ // this can be solved by resetting them backwards
for (let k = this._runners.length; k--;) {
// Get and run the current runner and ignore it if its inactive
const runnerInfo = this._runners[k]