iPad 1 (normal) | iPhone 4 (normal) | iPad 1 (pre-run) | iPhone 4 (pre-run) | |
---|---|---|---|---|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Returns the direction of the binding. If isForward is YES, then the value | |
being passed came from the "from" side of the binding (i.e. the "Binding.path" | |
you named). If isForward is NO, then the value came from the "to" side (i.e. | |
the property you named with "propertyBinding"). You can vary your transform | |
behavior if you are based on the direction of the change. | |
@returns {Boolean} | |
*/ | |
isForward: function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
res.send(JSON.stringify({ | |
state: 'success', | |
fileName: file.filename, | |
mimeType: file.mime, | |
imagePath: relativePath | |
}), { | |
'Content-Type': 'text/plain' | |
}, 200); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// at the end of main.js... | |
var buttonView = SC.ButtonView.create({ | |
layout: { left: -1000, width: 100, height: 24, top: 0 }, | |
didAppendToDocument: function() { | |
var self = this, | |
layer = this.get('layer'), | |
params; | |
params = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Apply this mixin to a pane to make it slide in from the top and fill the screen. The pane should not override layout. | |
*/ | |
MyApp.FullScreenSheetPane = { | |
// May not be necessary in your app | |
defaultResponder: MyApp, | |
// Make sure it is offscreen (these values will be auto-adjusted) | |
layout: { top: −200, left: 0, height: 200, right: 0 }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ... */ | |
var items = Items.store.find('Items.Item'); | |
// Don't need this | |
//Items.selectedItemsController.set('content',[]); | |
Items.mainItemsController.set('content', items); | |
/* ... */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========================================================================== | |
// Project: SproutCore - JavaScript Application Framework | |
// Copyright: ©2006-2011 Strobe Inc. and contributors. | |
// Portions ©2008-2011 Apple Inc. All rights reserved. | |
// License: Licensed under MIT license (see license.js) | |
// ========================================================================== | |
/** | |
This mixin should be applied to all control views. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
This mixin automatically positions the view's child views in a stack either | |
vertically or horizontally and adjusts the View's height or width respectively | |
to fit. It does this by checking the height or width of each child view | |
(depending on the direction of layout) and positioning the following child view | |
accordingly. | |
If the child view's frame changes, then the parent view will re-layout all of | |
the others to fit and re-adjust its width or height to fit as well. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myStack: SC.StackedView.extend({ | |
// Observes changes to our content. | |
contentDidChange: function () { | |
var previousContent = this.previousContent, | |
this.get('content'); | |
// Clean up observer on previous content | |
if (previousContent) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A view that adds an 'active' class when the mouse is over it. | |
*/ | |
MyApp.MyView = SC.View.extend(SC.StatechartManager, { | |
/** @private */ | |
displayProperties: ['isActive', 'isEnabled'], | |
/** | |
Whether the view is active or not. |
OlderNewer