Skip to content

Commit

Permalink
v0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chanind committed Mar 6, 2018
1 parent a6f42fd commit 813aafe
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 31 deletions.
23 changes: 10 additions & 13 deletions dist/hanzi-writer-lib.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Hanzi Writer v0.9.0
* Hanzi Writer v0.9.1
* https://chanind.github.io/hanzi-writer
*/
module.exports =
Expand Down Expand Up @@ -516,13 +516,10 @@ var highlightStroke = function highlightStroke(charName, stroke, speed) {
};

var showStroke = function showStroke(charName, strokeNum, duration) {
return [new Mutation('character.' + charName, {
opacity: 1,
strokes: _defineProperty({}, strokeNum, {
displayPortion: 1,
opacity: 1
})
}, { duration: duration })];
return [new Mutation('character.' + charName + '.strokes.' + strokeNum, {
displayPortion: 1,
opacity: 1
}, { duration: duration, force: true })];
};

var animateCharacter = function animateCharacter(charName, character, fadeDuration, speed, delayBetweenStrokes) {
Expand Down Expand Up @@ -1378,7 +1375,7 @@ RenderState.prototype.cancelMutations = function (scopes) {
this._mutationChains.forEach(function (chain) {
chain._scopes.forEach(function (chainScope) {
scopes.forEach(function (scope) {
if (chainScope.indexOf(scope) >= 0) {
if (chainScope.indexOf(scope) >= 0 || scope.indexOf(chainScope) >= 0) {
_this3._cancelMutationChain(chain);
}
});
Expand Down Expand Up @@ -1851,11 +1848,11 @@ var _require = __webpack_require__(0),
var startQuiz = function startQuiz(character, fadeDuration) {
return characterActions.hideCharacter('main', character, fadeDuration).concat([new Mutation('character.highlight', {
opacity: 1,
strokes: objRepeat({ opacity: 0, force: true }, character.strokes.length)
}), new Mutation('character.main', {
strokes: objRepeat({ opacity: 0 }, character.strokes.length)
}, { force: true }), new Mutation('character.main', {
opacity: 1,
strokes: objRepeat({ opacity: 0, force: true }, character.strokes.length)
})]);
strokes: objRepeat({ opacity: 0 }, character.strokes.length)
}, { force: true })]);
};

var startUserStroke = function startUserStroke(id, point) {
Expand Down
4 changes: 2 additions & 2 deletions dist/hanzi-writer-lib.min.js

Large diffs are not rendered by default.

23 changes: 10 additions & 13 deletions dist/hanzi-writer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Hanzi Writer v0.9.0
* Hanzi Writer v0.9.1
* https://chanind.github.io/hanzi-writer
*/
/******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -515,13 +515,10 @@ var highlightStroke = function highlightStroke(charName, stroke, speed) {
};

var showStroke = function showStroke(charName, strokeNum, duration) {
return [new Mutation('character.' + charName, {
opacity: 1,
strokes: _defineProperty({}, strokeNum, {
displayPortion: 1,
opacity: 1
})
}, { duration: duration })];
return [new Mutation('character.' + charName + '.strokes.' + strokeNum, {
displayPortion: 1,
opacity: 1
}, { duration: duration, force: true })];
};

var animateCharacter = function animateCharacter(charName, character, fadeDuration, speed, delayBetweenStrokes) {
Expand Down Expand Up @@ -1377,7 +1374,7 @@ RenderState.prototype.cancelMutations = function (scopes) {
this._mutationChains.forEach(function (chain) {
chain._scopes.forEach(function (chainScope) {
scopes.forEach(function (scope) {
if (chainScope.indexOf(scope) >= 0) {
if (chainScope.indexOf(scope) >= 0 || scope.indexOf(chainScope) >= 0) {
_this3._cancelMutationChain(chain);
}
});
Expand Down Expand Up @@ -1850,11 +1847,11 @@ var _require = __webpack_require__(0),
var startQuiz = function startQuiz(character, fadeDuration) {
return characterActions.hideCharacter('main', character, fadeDuration).concat([new Mutation('character.highlight', {
opacity: 1,
strokes: objRepeat({ opacity: 0, force: true }, character.strokes.length)
}), new Mutation('character.main', {
strokes: objRepeat({ opacity: 0 }, character.strokes.length)
}, { force: true }), new Mutation('character.main', {
opacity: 1,
strokes: objRepeat({ opacity: 0, force: true }, character.strokes.length)
})]);
strokes: objRepeat({ opacity: 0 }, character.strokes.length)
}, { force: true })]);
};

var startUserStroke = function startUserStroke(id, point) {
Expand Down
4 changes: 2 additions & 2 deletions dist/hanzi-writer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hanzi-writer",
"version": "0.9.0",
"version": "0.9.1",
"author": "David Chanin <[email protected]> (http://chanind.github.io/hanzi-writer/)",
"description": "Hanzi Writer is a free and open-source javascript library for both animating simplified Chinese characters and quizzing users on character stroke order.",
"repository": "chanind/hanzi-writer",
Expand Down

0 comments on commit 813aafe

Please sign in to comment.