added force option to resetView
This commit is contained in:
parent
d755b811cc
commit
938e36dbc2
1 changed files with 3 additions and 3 deletions
|
@ -983,7 +983,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// experimental
|
// experimental
|
||||||
GameProxy.prototype.resetView = function () {
|
GameProxy.prototype.resetView = function (force) {
|
||||||
if (jsContext == "node")
|
if (jsContext == "node")
|
||||||
return Promise.reject(new Error("resetView(): not supported in node.js"));
|
return Promise.reject(new Error("resetView(): not supported in node.js"));
|
||||||
if (!this.area && !this.iframe)
|
if (!this.area && !this.iframe)
|
||||||
|
@ -993,8 +993,8 @@
|
||||||
var self = this;
|
var self = this;
|
||||||
return self.viewControl("stopAnimations")
|
return self.viewControl("stopAnimations")
|
||||||
.then((shouldRedisplayBoard) => {
|
.then((shouldRedisplayBoard) => {
|
||||||
if(shouldRedisplayBoard)
|
if(shouldRedisplayBoard || force)
|
||||||
self.game.DisplayBoard();
|
self.game.DisplayBoard();
|
||||||
})
|
})
|
||||||
} else
|
} else
|
||||||
return ProxiedMethod(this, "resetView");
|
return ProxiedMethod(this, "resetView");
|
||||||
|
|
Loading…
Reference in a new issue