dev: make clients reload css style automatically when source is updated + watched + rebuilded
This commit is contained in:
parent
c7e7982d5d
commit
6528fd076d
4 changed files with 19 additions and 1 deletions
|
|
@ -145,6 +145,16 @@ module.exports = {
|
|||
PXSCALE = data.match(/--pixel-scale\s*:\s*([^;]*)/)[1]
|
||||
INITIALZOOM = PXSCALE
|
||||
}
|
||||
},
|
||||
|
||||
reloadCss: function(){
|
||||
var queryString = '?reload=' + new Date().getTime();
|
||||
$('link[rel="stylesheet"]').each(function () {
|
||||
this.href = this.href.replace(/\?.*|$/, queryString);
|
||||
});
|
||||
setTimeout(()=>{
|
||||
$('canvas').trigger('resize')
|
||||
},100)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue