Skip to content

Instantly share code, notes, and snippets.

View ColinCampbell's full-sized avatar

Colin Campbell ColinCampbell

View GitHub Profile
diff --git a/frameworks/core_foundation/tests/views/view/animation.js b/frameworks/core_foundation/tests/views/view/animation.js
index fe6f663..b738b77 100644
--- a/frameworks/core_foundation/tests/views/view/animation.js
+++ b/frameworks/core_foundation/tests/views/view/animation.js
@@ -289,6 +289,32 @@ if (SC.platform.supportsCSSTransitions) {
SC.RunLoop.end();
});
+ test("should not add animation for properties that have the same value as existing layout", function() {
+ var callbacks = 0;
diff --git a/frameworks/core_foundation/views/view/animation.js b/frameworks/core_foundation/views/view/animation.js
index 39f9c56..a14115c 100644
--- a/frameworks/core_foundation/views/view/animation.js
+++ b/frameworks/core_foundation/views/view/animation.js
@@ -86,21 +86,24 @@ SC.View.reopen(
value = hash[key];
cur = layout[key];
- if (cur !== value) { didChange = YES; }
+ if (cur !== value) {
@ColinCampbell
ColinCampbell / main_page.js
Created March 9, 2011 00:26
/apps/test_app/resources/main_page.js
// ==========================================================================
// Project: TestApp - mainPage
// Copyright: ©2011 My Company, Inc.
// ==========================================================================
/*globals TestApp */
sc_require('views/tweet');
TestApp.mainPage = SC.Page.design({
SC.Request = SC.Request.extend({
_address: null,
address: function(key, value) {
if (value !== undefined) this._address = value;
else value = this._address;
return this.get('baseUrl') + value;
}
});
var record = MyApp.store.find(MyApp.Record, 1);
record.addObserver('status', this, function() {
if (record.get('status') === SC.Record.READY_CLEAN) {
record.removeObserver('status', this, arguments.callee);
// code here
}
});
diff --git a/frameworks/runtime/core.js b/frameworks/runtime/core.js
index 67bef70..a852a22 100644
--- a/frameworks/runtime/core.js
+++ b/frameworks/runtime/core.js
@@ -756,8 +756,37 @@ SC.mixin(/** @scope SC */ {
stringsFor: function(lang, strings) {
SC.mixin(SC.STRINGS, strings);
return this ;
- }
+ },

SproutCore Experimental Framework

The SproutCore Experimental framework contains code that is not ready to be included in the core framework and is actively being worked on. This code is being improved with the expectation that eventually the code that lives in this parent framework will become a part of the core framework. If you are interested in using a framework that is experimental, can you do the following in your Buildfile:

diff --git a/frameworks/amber/system/device.js b/frameworks/amber/system/device.js
index 3e43239..177b2e8 100644
--- a/frameworks/amber/system/device.js
+++ b/frameworks/amber/system/device.js
@@ -10,6 +10,10 @@ require('system/ready');
require('system/root_responder');
require('system/platform');
+SC.PORTRAIT_ORIENTATION = 'portrait';
+SC.LANDSCAPE_ORIENTATION = 'landscape';
SC.Page = SC.Page.extend({
init: function() {
sc_super();
var pages = SC.Page.instances;
if (!pages) pages = SC.Page.instances = [];
pages.push(this);
}
});