Skip to content

Instantly share code, notes, and snippets.

@kcarriedo
Created September 18, 2010 17:02
Show Gist options
  • Select an option

  • Save kcarriedo/585859 to your computer and use it in GitHub Desktop.

Select an option

Save kcarriedo/585859 to your computer and use it in GitHub Desktop.
// ==========================================================================
// Project: Jeff - mainPage
// Copyright: ©2010 My Company, Inc.
// ==========================================================================
/*globals Jeff */
// This page describes the main user interface for your application.
Jeff.mainPage = SC.Page.design({
// The main pane is made visible on screen as soon as your app is loaded.
// Add childViews to this pane for views to display immediately on page
// load.
mainPane: SC.MainPane.design({
childViews: "myAnimatedView button".w(),
button:SC.ButtonView.design({
layout:{centerX:450, centerY: 50, width:100, height:24},
action: 'stat',
target: 'Jeff.mainPage.mainPane',
title:"Enter"
}),
myAnimatedView: SC.LabelView.design(SC.Animatable, {
transitions: {
left: { duration: .25, timing: SC.TRANSITION_CSS_EASE },
top: .25, // duration as the default argument
width: .25,
opacity: { duration: 1.0 }
},
value:"Hello"
}),
stat: function()
{
console.debug(myAnimatedView);
this.myAnimatedView.adjust("width", 0).adjustStyle("opacity", 0);
}
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment