Add UI to choose oekaki background color. #555
This commit is contained in:
parent
64e1004fa8
commit
a25a4d7c44
@ -1444,6 +1444,31 @@ input#qr-filename {
|
|||||||
width: 0;
|
width: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
#qr .oekaki-bg {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
height: 100%;
|
||||||
|
width: 10%;
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
#qr .oekaki-bg > * {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
#qr .oekaki-bg > :not([name="oekaki-bgcolor"]) {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
#qr [name="oekaki-bgcolor"] {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#qr [name="oekaki-bg"]:not(:checked) ~ [name="oekaki-bgcolor"] {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
#qr input[type="file"] {
|
#qr input[type="file"] {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@ -29,6 +29,7 @@
|
|||||||
<input type="button" id="qr-draw-button" value="Draw">
|
<input type="button" id="qr-draw-button" value="Draw">
|
||||||
<label><span>Width:</span><input name="oekaki-width" value="400" type="number" class="field" size="1"></label>
|
<label><span>Width:</span><input name="oekaki-width" value="400" type="number" class="field" size="1"></label>
|
||||||
<label><span>Height:</span><input name="oekaki-height" value="400" type="number" class="field" size="1"></label>
|
<label><span>Height:</span><input name="oekaki-height" value="400" type="number" class="field" size="1"></label>
|
||||||
|
<span class="oekaki-bg" title="Background Color"><input name="oekaki-bg" type="checkbox" checked><input name="oekaki-bgcolor" type="color" value="#ffffff"></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="file-n-submit">
|
<div id="file-n-submit">
|
||||||
<input type="button" id="qr-file-button" value="Files">
|
<input type="button" id="qr-file-button" value="Files">
|
||||||
|
|||||||
@ -82,10 +82,14 @@ QR.oekaki =
|
|||||||
FCX.oekakiName = 'tegaki.png'
|
FCX.oekakiName = 'tegaki.png'
|
||||||
Tegaki.open
|
Tegaki.open
|
||||||
onDone: FCX.oekakiCB
|
onDone: FCX.oekakiCB
|
||||||
onCancel: ->
|
onCancel: -> Tegaki.bgColor = '#ffffff'
|
||||||
width: +document.querySelector('#qr [name=oekaki-width]').value
|
width: +document.querySelector('#qr [name=oekaki-width]').value
|
||||||
height: +document.querySelector('#qr [name=oekaki-height]').value
|
height: +document.querySelector('#qr [name=oekaki-height]').value
|
||||||
bgColor: '#ffffff'
|
bgColor:
|
||||||
|
if document.querySelector('#qr [name=oekaki-bg]').checked
|
||||||
|
document.querySelector('#qr [name=oekaki-bgcolor]').value
|
||||||
|
else
|
||||||
|
'transparent'
|
||||||
|
|
||||||
button: ->
|
button: ->
|
||||||
if QR.selected.file
|
if QR.selected.file
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user