Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make clicking on an empty point work better in viewing+problem mode #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion player/js/all.compressed.js
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,7 @@ this.prefs={};
this.prefs.markCurrent=typeof cfg.markCurrent!="undefined"?!!cfg.markCurrent:true;
this.prefs.markNext=typeof cfg.markNext!="undefined"?cfg.markNext:false;
this.prefs.markVariations=typeof cfg.markVariations!="undefined"?!!cfg.markVariations:true;
this.prefs.restrictViewMoveSearch=typeof cfg.restrictViewMoveSearch!="undefined"?!!cfg.restrictViewMoveSearch:false;
this.prefs.showGameInfo=!!cfg.showGameInfo;
this.prefs.showPlayerInfo=!!cfg.showPlayerInfo;
this.prefs.showTools=!!cfg.showTools;
Expand Down Expand Up @@ -1907,7 +1908,7 @@ return;
}
}
}
if(this.mode=="view"){
if(this.mode=="view"&&!(this.problemMode||this.prefs.restrictViewMoveSearch)){
var _a7=this.cursor.getGameRoot(),_a8=[0,_a7.getPosition()],mn=0,_aa=_a7._children[0];
while(_aa){
if(_aa.getMove()==_a4){
Expand Down
5 changes: 4 additions & 1 deletion player/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ eidogo.Player.prototype = {
cfg.markNext : false;
this.prefs.markVariations = typeof cfg.markVariations != "undefined" ?
!!cfg.markVariations : true;
this.prefs.restrictViewMoveSearch = typeof cfg.restrictViewMoveSearch != "undefined" ?
!!cfg.restrictViewMoveSearch : false;
this.prefs.showGameInfo = !!cfg.showGameInfo;
this.prefs.showPlayerInfo = !!cfg.showPlayerInfo;
this.prefs.showTools = !!cfg.showTools;
Expand Down Expand Up @@ -1132,7 +1134,8 @@ eidogo.Player.prototype = {
}
}

if (this.mode == "view") {
if (this.mode == "view" && !(this.problemMode ||
this.prefs.restrictViewMoveSearch)) {
// Jump to any moved played at the clicked coordinate
var root = this.cursor.getGameRoot(),
path = [0, root.getPosition()],
Expand Down