Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
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: jsbin/jsbin
base: c5251fc5bc
...
head fork: jsbin/jsbin
compare: abbe000284
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
1  TODO.md
@@ -19,7 +19,6 @@
- Options for pre-rendering
- .getCode runs through panel language
- "insertionPoint" means we can have more panels
-- Horizontal/Vertical switching affects code panels only - this will make the implementation MUCH easier
# Save
View
2  js/chrome/splitter.js
@@ -200,10 +200,8 @@ $.fn.splitter = function () {
}
if ($el.is(':hidden')) {
- console.log('splitter hidden');
$handle.hide();
} else {
- console.log('splitter NOT hidden');
$el.css('border-' + props[type].cssProp, '1px solid #ccc');
moveSplitter(x !== undefined ? x : $el.offset()[props[type].cssProp]);
}
View
5 js/editors/editors.js
@@ -73,7 +73,7 @@ panels.restore = function () {
for (i = 0; i < toopen.length; i++) {
name = toopen[i];
if (panels.panels[name]) {
- console.log(name, 'width', state[name], width * parseFloat(state[name]) / 100);
+ // console.log(name, 'width', state[name], width * parseFloat(state[name]) / 100);
if (openWithSameDimensions) {
panels.panels[name].show(width * parseFloat(state[name]) / 100);
} else {
@@ -162,13 +162,10 @@ panels.distribute = function () {
if (nestedPanels.length > 1) {
top = 0;
nestedPanels = nestedPanels.filter(':visible');
- console.log(nestedPanels);
height = 100 / nestedPanels.length;
nestedPanels.each(function (i) {
- debugger;
bottom = 100 - (height * (i+1));
var panel = jsbin.panels.panels[$.data(this, 'name')];
- console.log(panel.id, top, bottom);
// $(this).css({ top: top + '%', bottom: bottom + '%' });
$(this).css('top', top + '%');
$(this).css('bottom', bottom + '%' );
View
15 js/editors/panel.js
@@ -94,21 +94,20 @@ Panel.prototype = {
// check to see if there's a panel to the left.
// if there is, take it's size/2 and make this our
// width
- var panel = this;
+ var panel = this,
+ panelCount = panel.$el.find('.panel').length;
// panel.$el.show();
if (panel.splitter.length) {
- if (panel.$el.find('.panel').length == 0) {
- console.log(panel.id, 'showing panel by name')
+ if (panelCount == 0 || panelCount > 1) {
var $panel = $('.panel.' + panel.id).show();
// $panel.next().show(); // should be the splitter...
+ $panel.closest('.panelwrapper').show();
} else {
- console.log(panel.id, 'showing default panel')
panel.$el.show();
}
panel.splitter.show();
} else {
- console.log('showing default panel 2')
panel.$el.show();
}
@@ -161,6 +160,12 @@ Panel.prototype = {
$panel.prev().hide(); // hide the splitter if there is one
// TODO trigger a distribute horizontally
+ if ($panel.closest('.panelwrapper').find('.panel:visible').length === 0) {
+ console.log('hiding related panel');
+ $panel.closest('.panelwrapper').hide();
+ // panel.splitter.hide();
+ // TODO FIXME
+ }
} else {
panel.$el.hide();
panel.splitter.hide();
View
4 tips.json
@@ -2,8 +2,8 @@
[
'Use ctrl+shift+? to show the keyboard shortcuts',
'Make sure you check out the help and tutorials - a blog of screencasts',
-'To only show the HTML panel use #html on the end of the url, such as http://jsbin.com/#html',
+'To only show the HTML panel use ?html on the end of the url, such as http://jsbin.com/?html',
'Refreshing the window will not lose your changes.',
'Use console.log to display debug information. If a web console is present, then the logging goes there, otherwise it will show in a custom console window.',
-'To view only the JavaScript append /js to the url, i.e. http://jsbin.com/ujayi/js - useful for Ajax testing'
+'To view only the JavaScript append .js to the url, i.e. http://jsbin.com/ujayi.js - useful for Ajax testing'
]

No commit comments for this range

Something went wrong with that request. Please try again.