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 // 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");