Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: sebleedelisle/jsbin
base: c906eee2cb
...
head fork: sebleedelisle/jsbin
compare: 1a10ab1ab8
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 7 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 23, 2012
@remy remy Putting live panel back on far right
Fixes regression bugs on panel position - it'll all be sorted when we
move to new panel logic.
6326028
@sebleedelisle CreativeJS customisations 98d7827
@sebleedelisle Merge remote branch 'upstream/master' a0d72eb
Commits on Mar 24, 2012
@sebleedelisle Changing default code
Signed-off-by: Seb Lee-Delisle <sebleedelisle@gmail.com>
1a10ab1
View
2  VERSION
@@ -1 +1 @@
-2.9.14
+2.9.12
View
28 app.php
@@ -434,20 +434,16 @@ function defaultCode($not_found = false) {
$html = <<<HERE_DOC
<!DOCTYPE html>
<html>
-<head>
-<meta charset=utf-8 />
-<title>JS Bin</title>
-<!--[if IE]>
- <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
-<![endif]-->
-<style>
- article, aside, figure, footer, header, hgroup,
- menu, nav, section { display: block; }
-</style>
-</head>
-<body>
- <p id="hello">Hello World</p>
-</body>
+ <head>
+ <title>CreativeJS graphics playground</title>
+ <style>
+ canvas { border : 1px lightgray solid; }
+ </style>
+ </head>
+ <body>
+ <script class="jsbin" src="/js/creativejs.js"></script>
+ <canvas id="cjsCanvas" width='200' height='200'></canvas>
+ </body>
</html>
HERE_DOC;
}
@@ -459,12 +455,12 @@ function defaultCode($not_found = false) {
} else if (@$_REQUEST['javascript']) {
$javascript = $_REQUEST['javascript']; // it's beyond me why I ever used js?
} else if ($usingRequest) {
- $javascript = '';
+ $javascript = "";
} else {
if ($not_found) {
$javascript = 'document.getElementById("hello").innerHTML = "<strong>This URL does not have any code saved to it.</strong>";';
} else {
- $javascript = "if (document.getElementById('hello')) {\n document.getElementById('hello').innerHTML = 'Hello World - this was inserted using JavaScript';\n}\n";
+ $javascript = "var canvas = document.getElementById('cjsCanvas');\nvar c = canvas.getContext('2d');";
}
}
View
2  css/style.css
@@ -1121,7 +1121,7 @@ details li, .details li {
}
.html .CodeMirror-scroll > div {
- margin-top: 60px;
+ margin-top: 25px;
}
View
9 index.php
@@ -72,7 +72,7 @@
<a id="save" title="Save new bin" class="button save group" href="<?php echo ROOT?>save">Save</a>
<?php endif ?>
<a id="download" title="Save to drive" class="button download group light" href="<?php echo ROOT?>download">Download</a>
- <a id="startingpoint" title="Set as starting code" class="button group" href="<?php echo ROOT?>save">As template</a>
+ <!--<a id="startingpoint" title="Set as starting code" class="button group" href="<?php echo ROOT?>save">As template</a>-->
</div>
<span id="panelsvisible" class="gap">View:
@@ -84,7 +84,7 @@
</div>
<div class="help">
<ul class="flat">
- <li><a target="_blank" href="http://jsbin.tumblr.com">Help &amp; tutorials</a></li>
+ <!--<li><a target="_blank" href="http://jsbin.tumblr.com">Help &amp; tutorials</a></li>-->
<li class="prefsButton"><a href="#"><img src="/images/gear.png"></a></li>
</ul>
</div>
@@ -100,6 +100,7 @@
<div class="code stretch html">
<div class="label">
<p>HTML</p>
+ <!--
<label for="library">Include</label>
<select id="library">
<option value="none">None</option>
@@ -111,15 +112,15 @@
<option value="mootools">Mootools</option>
<option value="dojo">Dojo</option>
<option value="ext">Ext js</option>
- </select>
+ </select>-->
</div>
<div class="editbox">
<textarea spellcheck="false" autocapitalize="off" autocorrect="off" id="html"></textarea>
</div>
</div>
- <div id="live" class="stretch livepreview"><a href="<?php echo ROOT ?>live" target="_new" id="popout" class="popout button light left right">Pop out</a></div>
</div>
+ <div id="live" class="stretch livepreview"><a href="<?php echo ROOT ?>live" target="_new" id="popout" class="popout button light left right">Pop out</a></div>
<div id="preview" class="binview stretch"></div>
<form method="post" action="<?php echo $code_id_path?>save">
<input type="hidden" name="method" />
View
25 js/creativejs.js
@@ -77,7 +77,7 @@ function radians(deg) {return deg*Math.PI/180;};
function degrees(rad) {return rad*180/Math.PI;};
-var mouseX, mouseY, canvas, context, c, width=10, height, framerate, lastUpdate;
+var mouseX, mouseY, lastMouseX, lastMouseY, framerate, lastUpdate;
frameRate = 60;
lastUpdate = Date.now();
@@ -90,33 +90,20 @@ function cjsloop() {
if((typeof draw == 'function') && (elapsedMils>(1000/frameRate))) {
draw();
lastUpdate = now;
+ lastMouseX = mouseX;
+ lastMouseY = mouseY;
}
}
-canvas = document.createElement('canvas');
-context = c = canvas.getContext('2d');
-
-
-canvas.addEventListener('mousemove', onMouseMove);
+document.body.addEventListener('mousemove', onMouseMove);
function onMouseMove(e) {
- mouseX = e.clientX;
- mouseY = e.clientY;
+ mouseX = e.clientX;
+ mouseY = e.clientY;
}
onLoad();
-function delayLoad() {
- setTimeout(onLoad, 1);
-}
function onLoad() {
- document.body.appendChild(canvas);
-
- document.body.style.margin = '0px';
-// document.body.style.overflow = 'hidden';
-
-window.width = canvas.width = window.innerWidth;
-window.height = canvas.height = window.innerHeight;
-console.log('loaded', width);
cjsloop() ;
}
View
4 js/editors/libraries.js
@@ -19,7 +19,7 @@ Libraries.prototype.init = function () {
creativejs: {
text:'CreativeJS',
scripts: [
- { text: 'Non-coders framework', url:'/js/CreativeJS.js'}
+ { text: 'Non-coders framework', url:'/js/CreativeJS.js', position:'body'}
]
},
yui: {
@@ -105,7 +105,7 @@ Libraries.prototype.init = function () {
// }
},
// NOTE if a new library category is added, you need to add it here
- order = ['creativejs'];//'creativejs jquery jqueryui jquerymobile prototype yui mootools dojo others'.split(' '),
+ order = [];//'creativejs jquery jqueryui jquerymobile prototype yui mootools dojo others'.split(' '),
i = 0;
this.length = 0; // triggers support for length prop
View
2  js/jsbin.js
@@ -30,7 +30,7 @@ jQuery.expr[':'].host = function(obj, index, meta, stack) {
}, delay);
};
}
-window.jsbin.settings = JSON.parse(localStorage.getItem('settings') || '{ "show": { "html": true, "javascript": true }, "theme": "jsbin" }');
+window.jsbin.settings = JSON.parse(localStorage.getItem('settings') || '{ "show": { "html": true, "javascript": true, "live":true }, "theme": "jsbin" }');
//= require "vendor/json2"
//= require "editors/editors"
//= require "render/render"

No commit comments for this range

Something went wrong with that request. Please try again.