prevent impossible zoom
This commit is contained in:
parent
49ac21bf51
commit
e2fca54813
1 changed files with 3 additions and 2 deletions
|
|
@ -146,11 +146,12 @@ init = function(session,callback) {
|
|||
var scrollbarHeight = 20
|
||||
scrolls = function(){
|
||||
if (webFrame) {
|
||||
$('.tab').on('mousewheel.zoom',function(e) {
|
||||
$('html').on('mousewheel.zoom',function(e) {
|
||||
// console.log(e)
|
||||
if (e.ctrlKey) {
|
||||
e.preventDefault()
|
||||
var d = -e.originalEvent.deltaY/Math.abs(e.originalEvent.deltaY)/10,
|
||||
if (e.originalEvent.deltaY==0) return
|
||||
var d = -e.originalEvent.deltaY/Math.abs(e.originalEvent.deltaY)/20,
|
||||
s = d+webFrame.getZoomFactor()
|
||||
webFrame.setZoomFactor(s)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue