Skip to content

Instantly share code, notes, and snippets.

@cj3kim cj3kim/gist:11230047
Created Apr 23, 2014

Embed
What would you like to do?
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
You can’t perform that action at this time.