Skip to content

Instantly share code, notes, and snippets.

@cj3kim
Created April 23, 2014 19:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cj3kim/11230047 to your computer and use it in GitHub Desktop.
require("./famous-polyfills/index");
require('domready')(function () {
var Engine = require('./famous/core/Engine');
var InputSurface = require('./famous/surfaces/InputSurface');
var StateModifier = require('./famous/modifiers/StateModifier');
var ContainerSurface = require('./famous/surfaces/ContainerSurface');
var Scrollview = require('./famous/views/Scrollview');
// create the main context
var mainContext = Engine.createContext();
var wrapper = new ContainerSurface({
size: [undefined, undefined],
});
var chatWrapper = new ContainerSurface({
size: [false, undefined],
properties: {
width: '80%',
backgroundColor: 'blue'
}
});
var chatDisplay = new Scrollview({
size: [undefined, false],
properties: {
height: '80%',
backgroundColor: 'red'
}
});
var chatMessages = [];
chatDisplay.sequenceFrom(chatMessages);
chatWrapper.add(chatDisplay);
wrapper.add(chatWrapper)
mainContext.add(wrapper);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment