From: Cheng Zhao Date: Mon, 5 May 2014 08:30:37 +0000 (+0800) Subject: Enable dragging to open an app. X-Git-Tag: v0.12.2~2^2~4 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=84bf956725653ada43e3a29d8553d24119e1e105;p=electron.git Enable dragging to open an app. --- diff --git a/atom/browser/default_app/index.html b/atom/browser/default_app/index.html index 94a5f23f..6013948c 100644 --- a/atom/browser/default_app/index.html +++ b/atom/browser/default_app/index.html @@ -38,6 +38,20 @@ overflow: auto; padding: 6px 10px; } + + #holder { + border: 4px dashed #ccc; + margin: 0 auto; + height: 300px; + color: #ccc; + font-size: 40px; + line-height: 300px; + text-align: center; + } + #holder.hover { + border: 4px dashed #999; + color: #eee; + } @@ -48,6 +62,11 @@ var openWiki = function() { require('shell').openExternal('https://github.com/atom/atom-shell/blob/master/docs/tutorial/quick-start.md'); } + + document.ondragover = document.ondrop = function(e) { + e.preventDefault(); + return false; + }

Welcome to Atom Shell

@@ -64,5 +83,35 @@ app, you can read the Quick Start guide in atom-shell's docs on how to write one.

+ +

+ Or you can just drag your app here to run it: +

+ +
+ Drag your app here to run it +
+ +