Skip to content

Commit

Permalink
Add disablePinchToZoom to ApplicationDelegate
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Sobo committed Oct 16, 2015
1 parent 6616078 commit badba28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/application-delegate.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ _ = require 'underscore-plus'
ipc = require 'ipc'
remote = require 'remote'
shell = require 'shell'
webFrame = require 'web-frame'
{Disposable} = require 'event-kit'
{getWindowLoadSettings, setWindowLoadSettings} = require './window-load-settings-helpers'

Expand Down Expand Up @@ -163,3 +164,6 @@ class ApplicationDelegate

openExternal: (url) ->
shell.openExternal(url)

disablePinchToZoom: ->
webFrame.setZoomLevelLimits(1, 1)
4 changes: 1 addition & 3 deletions src/atom-environment.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
crypto = require 'crypto'
path = require 'path'
webFrame = require 'web-frame'

_ = require 'underscore-plus'
{deprecate} = require 'grim'
Expand Down Expand Up @@ -189,8 +188,7 @@ class AtomEnvironment extends Model
@stylesElement = @styles.buildStylesElement()
@document.head.appendChild(@stylesElement)

# Disable pinch-to-zoom.
webFrame.setZoomLevelLimits(1, 1)
@applicationDelegate.disablePinchToZoom()

@keymaps.subscribeToFileReadFailure()
@keymaps.loadBundledKeymaps()
Expand Down

0 comments on commit badba28

Please sign in to comment.