1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 10:16:26 +00:00

Fix: Disable pinch to zoom

This commit is contained in:
Rokt33r
2015-07-30 04:11:31 +09:00
parent 9e929f80ad
commit 920704075e
5 changed files with 21 additions and 3 deletions

View File

@@ -1,11 +1,20 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>CodeXen Popup</title> <title>CodeXen Popup</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<link rel="stylesheet" href="../../node_modules/font-awesome/css/font-awesome.min.css" media="screen" title="no title" charset="utf-8"> <link rel="stylesheet" href="../../node_modules/font-awesome/css/font-awesome.min.css" media="screen" title="no title" charset="utf-8">
<link rel="shortcut icon" href="favicon.ico"> <link rel="shortcut icon" href="favicon.ico">
<script> <script>
document.addEventListener('mousewheel', function(e) {
if(e.deltaY % 1 !== 0) {
e.preventDefault()
}
})
if (!Object.assign) { if (!Object.assign) {
Object.defineProperty(Object, 'assign', { Object.defineProperty(Object, 'assign', {
enumerable: false, enumerable: false,

View File

@@ -2,11 +2,19 @@
<html> <html>
<head> <head>
<title>CodeXen</title> <title>CodeXen</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<link rel="stylesheet" href="../../node_modules/font-awesome/css/font-awesome.min.css" media="screen" title="no title" charset="utf-8"> <link rel="stylesheet" href="../../node_modules/font-awesome/css/font-awesome.min.css" media="screen" title="no title" charset="utf-8">
<link rel="shortcut icon" href="favicon.ico"> <link rel="shortcut icon" href="favicon.ico">
<script> <script>
document.addEventListener('mousewheel', function(e) {
if(e.deltaY % 1 !== 0) {
e.preventDefault()
}
})
if (!Object.assign) { if (!Object.assign) {
Object.defineProperty(Object, 'assign', { Object.defineProperty(Object, 'assign', {
enumerable: false, enumerable: false,

View File

@@ -59,7 +59,6 @@
margin-bottom 15px margin-bottom 15px
height 44px height 44px
text-align center text-align center
border-radius 22px
.alertInfo .alertInfo
alertInfo() alertInfo()
.alertError .alertError

View File

@@ -8,7 +8,7 @@
&.hide &.hide
display none display none
.modal .modal
width 500px width 600px
margin 50px auto 0 margin 50px auto 0
absolute top left right absolute top left right
background-color white background-color white

View File

@@ -23,7 +23,7 @@ app.on('ready', function () {
Menu.setApplicationMenu(menu) Menu.setApplicationMenu(menu)
// menu end // menu end
appIcon = new Tray(__dirname + '/tray-icon.png') appIcon = new Tray(__dirname + '/tray-icon.png')
appIcon.setToolTip('This is my application.') appIcon.setToolTip('Codexen')
appIcon.on('clicked', function () { appIcon.on('clicked', function () {
if (mainWindow == null) { if (mainWindow == null) {
makeNewMainWindow() makeNewMainWindow()
@@ -46,6 +46,7 @@ app.on('ready', function () {
height: 400, height: 400,
show: false, show: false,
frame: false, frame: false,
'zoom-factor': 1.0,
'always-on-top': true, 'always-on-top': true,
'web-preferences': { 'web-preferences': {
'overlay-scrollbars': true, 'overlay-scrollbars': true,
@@ -82,6 +83,7 @@ function makeNewMainWindow () {
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
width: 1080, width: 1080,
height: 720, height: 720,
'zoom-factor': 1.0,
'web-preferences': { 'web-preferences': {
'overlay-scrollbars': true 'overlay-scrollbars': true
} }