- theming support added
- not caching fake input color as private var because it doesn't work with themes
This commit is contained in:
parent
8469c688d1
commit
6574b8465a
7 changed files with 31 additions and 10 deletions
|
|
@ -11,7 +11,7 @@ module.exports = {
|
|||
// fetch ids corresponding to the osc path
|
||||
var path = data.path
|
||||
var ids = WIDGETS_ID_BY_PATH[path]
|
||||
|
||||
|
||||
for (i in ids) {
|
||||
var id = ids[i]
|
||||
// update
|
||||
|
|
@ -77,6 +77,17 @@ module.exports = {
|
|||
var data = data || event
|
||||
|
||||
utils.createPopup(icon('warning')+' '+data.title,data.text)
|
||||
},
|
||||
|
||||
applyStyle: function(event,data){
|
||||
var data = data || event
|
||||
var style = document.createElement('style');
|
||||
style.innerHTML = data;
|
||||
document.body.appendChild(style);
|
||||
if (data.indexOf('--pixel-scale')) {
|
||||
PXSCALE = data.match(/--pixel-scale\s*:\s*([^;]*)/)[1]
|
||||
INITIALZOOM = PXSCALE
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ var tabs = function() {
|
|||
// if shift is pressed (native), or if there is no vertical scrollbar,
|
||||
// or if mouse is on h-scrollbar
|
||||
var scrollbarHeight = 20
|
||||
var initialZoom = PXSCALE
|
||||
var scrolls = function(){
|
||||
$('html').on('mousewheel.zoom',function(e) {
|
||||
// console.log(e)
|
||||
|
|
@ -51,9 +50,9 @@ var scrolls = function(){
|
|||
})
|
||||
$(document).on('keydown.resetzoom', function(e){
|
||||
if (e.keyCode==96||e.keyCode==48) {
|
||||
PXSCALE = 1
|
||||
PXSCALE = INITIALZOOM
|
||||
document.documentElement.style.setProperty("--pixel-scale",'')
|
||||
document.documentElement.style.setProperty("--pixel-scale",initialZoom)
|
||||
document.documentElement.style.setProperty("--pixel-scale",PXSCALE)
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue