added force option to resetView

This commit is contained in:
mig 2017-04-26 09:46:22 +02:00
parent d755b811cc
commit 938e36dbc2

View file

@ -983,7 +983,7 @@
}
// experimental
GameProxy.prototype.resetView = function () {
GameProxy.prototype.resetView = function (force) {
if (jsContext == "node")
return Promise.reject(new Error("resetView(): not supported in node.js"));
if (!this.area && !this.iframe)
@ -993,8 +993,8 @@
var self = this;
return self.viewControl("stopAnimations")
.then((shouldRedisplayBoard) => {
if(shouldRedisplayBoard)
self.game.DisplayBoard();
if(shouldRedisplayBoard || force)
self.game.DisplayBoard();
})
} else
return ProxiedMethod(this, "resetView");