Skip to content

Commit

Permalink
Add color picker button #4
Browse files Browse the repository at this point in the history
  • Loading branch information
tshino committed May 25, 2017
1 parent 8ef1c78 commit 31b9855
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compare.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
<span class="tooltip keys en">Show grid <span>g</span></span>
<span class="tooltip keys ja">グリッドを表示 <span>g</span></span>
</button>
<button id="pickerbtn">
<span style="font-size: 14px">RGB</span>
<span class="tooltip keys en">Show color picker <span>p</span></span>
<span class="tooltip keys ja">カラーピッカーを表示 <span>p</span></span>
</button>
<div class="bottom">
<button id="fullscreen">
<img src="res/full.svg" width="100%">
Expand Down
2 changes: 2 additions & 0 deletions compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ $( function() {
$('#arrange').click(arrangeLayout);
$('#overlay').click(toggleOverlay);
$('#gridbtn').click(grid.toggle);
$('#pickerbtn').click(toggleColorPicker);
$('#fullscreen').click(toggleFullscreen);
$('#helpbtn').click(toggleHelp);

Expand Down Expand Up @@ -694,6 +695,7 @@ $( function() {
};
var toggleColorPicker = function() {
colorPickerInfo = colorPickerInfo ? null : {};
colorPickerInfo ? $('#pickerbtn').addClass('current') : $('#pickerbtn').removeClass('current');
crossCursor.enable(colorPickerInfo ? true : false);
updateLayout();
};
Expand Down

0 comments on commit 31b9855

Please sign in to comment.