ui: flat keyboard; disabled except on desktop
This commit is contained in:
parent
3f30ec32d3
commit
3022ee4703
5 changed files with 20 additions and 21 deletions
|
|
@ -5,4 +5,7 @@ require('./notifications')
|
|||
require('./ui-workspace')
|
||||
require('./main-menu')
|
||||
require('./ui-console')
|
||||
require('./ui-keyboard')
|
||||
|
||||
if (!navigator.userAgent.match(/Android|iPhone|iPad|iPod/i)) {
|
||||
require('./ui-keyboard')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,7 +236,4 @@ class OscKeybard extends UiWidget {
|
|||
}
|
||||
}
|
||||
|
||||
const k = new OscKeybard({element: DOM.get('osc-keyboard')[0]})
|
||||
|
||||
|
||||
module.exports = k
|
||||
module.exports = new OscKeybard({element: DOM.get('osc-keyboard')[0]})
|
||||
|
|
|
|||
|
|
@ -40,14 +40,19 @@ document.addEventListener('mousemove', function(event) {
|
|||
}
|
||||
}, {passive: false})
|
||||
|
||||
|
||||
var container = DOM.get('#osc-container')[0]
|
||||
function applylocalZoom() {
|
||||
if (localZoom === 1) {
|
||||
document.body.style.transformOrigin = ''
|
||||
document.body.style.transform = ''
|
||||
container.style.transformOrigin = ''
|
||||
container.parentNode.style.overflow = ''
|
||||
container.style.transform = ''
|
||||
} else {
|
||||
document.body.style.transformOrigin = `${mousePos[0]}% ${mousePos[1]}%`
|
||||
// container.style.transformOrigin = `${mousePos[0]}% ${mousePos[1]}%`
|
||||
container.parentNode.style.overflow = 'auto'
|
||||
container.style.transformOrigin = '0 0'
|
||||
requestAnimationFrame(()=>{
|
||||
document.body.style.transform = `scale(${localZoom})`
|
||||
container.style.transform = `scale(${localZoom})`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue