Skip to content

Commit

Permalink
added hand as a default selected tool when in acceptance mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanmustafin committed Jul 9, 2017
1 parent 7bacb54 commit a89cb30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions front/js/app/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function getElements() {
btnZoomOut = document.getElementById(Tool.zoomOut().buttonId);
}

function initToolbar() {
function initToolbar(acceptMode) {
/*global initSave*/
/*eslint no-undef: "error"*/
initSave();
Expand All @@ -123,7 +123,12 @@ function initToolbar() {
/*global initBrightness*/
/*eslint no-undef: "error"*/
initBrightness();
changeButtonsSelectionState(btnPolygon); // polygon tool is selected by default
if (acceptMode) {
changeButtonsSelectionState(btnHand); // hand tool is selected by default
} else {
changeButtonsSelectionState(btnPolygon); // polygon tool is selected by default
}

activeTool = Tool.polygon();
activeTool.onClick(true);
}
2 changes: 1 addition & 1 deletion front/js/toloka.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports.Task = extend(TolokaHandlebarsTask, function (options) {
initDOM();
initMultiLanguageSupport();
initPresentationLayer(acceptMode);
initToolbar();
initToolbar(acceptMode);
});

window.thisTask = this;
Expand Down

0 comments on commit a89cb30

Please sign in to comment.