mirror of
https://github.com/lovasoa/whitebophir
synced 2024-11-10 14:34:20 +00:00
Add a true color picker (jscolor from jscolor.com)
This commit is contained in:
parent
f744c91142
commit
c34c141b8e
3 changed files with 4 additions and 8 deletions
|
@ -8,6 +8,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" type="text/css" href="board.css" />
|
||||
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
|
||||
<script type="text/javascript" src="/js/jscolor/jscolor.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -32,7 +33,7 @@
|
|||
|
||||
<h3>Configuration</h3>
|
||||
<label for="chooseColor">Color:</label>
|
||||
<input type="color" id="chooseColor" value="black" />
|
||||
<input type="color" class="color {hash:true}" id="chooseColor" value="black" />
|
||||
<br/>
|
||||
<label for="chooseSize">Size:</label>
|
||||
<input type="range" id="chooseSize" value="10" min="1" max="50" step="1" />
|
||||
|
|
|
@ -252,14 +252,9 @@ Tools.positionElement = function (elem, x, y) {
|
|||
|
||||
(function color (){
|
||||
var chooser = document.getElementById("chooseColor");
|
||||
function update (){
|
||||
chooser.style.backgroundColor = chooser.value;
|
||||
}
|
||||
update();
|
||||
chooser.onkeyup = chooser.onchange = update;
|
||||
|
||||
Tools.getColor = function(){
|
||||
return chooser.style.backgroundColor;
|
||||
return chooser.value;
|
||||
};
|
||||
})();
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"collaborative",
|
||||
"whiteboard"
|
||||
],
|
||||
"version": "0.1.0-20",
|
||||
"version": "0.1.0-28",
|
||||
"dependencies": {
|
||||
"node-static": "0.7.x",
|
||||
"socket.io": "0.9.x"
|
||||
|
|
Loading…
Reference in a new issue