function SubView(options) { var that = this; View.apply(this, arguments); this.options = options; // Load models this.loadModels(); // Should switch to a RenderController or Lightbox for displaying this content? // - it would make it easy to switch between Loading / No Results / RealResults // this.contentLayout = new SequentialLayout(); this.contentLayout = new ScrollView(); this.contentLayout.Views = []; this.contentLayout.sequenceFrom(this.contentLayout.Views); this.createDefaultSurfaces(); this.createDefaultLightboxes(); this.contentLayout.Views.push(this.lightboxButtons); // Gather data after structure built App.Data.User.populated().then(function(){ // that.update_friend_collection(); // App.Data.User.on('sync', that.update_friend_collection.bind(that)); }); // Need to wait for at least 1 item before showing the result? // - otherwise, there is a Render error this.add(this.lightboxContent); }
function PageView(options) { var that = this; View.apply(this, arguments); this.options = options; // Have a profile photo? if(!App.Data.User.get('profilephoto.urls.thumb300x300')){ Utils.Notification.Toast('Need a picture of you!'); this.doNotShow = true; App.history.eraseLast(); App.history.navigate('profile/edit'); return; } // Models // create the layout this.layout = new HeaderFooterLayout({ headerSize: App.Defaults.Header.size, footerSize: App.Defaults.Footer.size }); this.createHeader(); this.createContent(); this.add(this.layout); }
function ControllerView(options) { View.apply(this, arguments); _initialize.call(this); _listeners.call(this); _buildTree.call(this); }
function SlideshowView(){ View.apply(this, arguments); var slideView = new SlideView(); this.add(slideView); }
function TimeListView() { View.apply(this, arguments); var times = require('app/config/defaultTimes'); this.collection = new Backbone.Collection(times); this.timeViews = []; this.scrollview = new Scrollview({ margin: 100000, properties: { backgroundColor: 'white' } }); this.scrollview.sync = new GenericSync(['mouse', 'touch', 'scroll'], {direction: 1}); this.scrollview._eventInput.pipe(this.scrollview.sync); this.scrollview.sync.pipe(this.scrollview._eventInput); this.viewSequence = new ViewSequence(this.timeViews); this.scrollview.sequenceFrom(this.viewSequence); this.setContent(); this._eventInput.on('timeSelected', function(data) { this._eventOutput.emit('timeSelected', data); }.bind(this)); this.add(this.scrollview); }
function yp() { this.background = '#363536'; this.border = '1px solid #E5E5E5'; View.apply(this, arguments); _init.call(this); _ypSvg.call(this); }
function FeaturedView() { View.apply(this, arguments); createBacking.call(this); createNoteworthy.call(this); createStaffPicks.call(this); }
function PageView(params) { var that = this; View.apply(this, arguments); this.params = params; this.loadModels(); // create the layout this.layout = new HeaderFooterLayout({ headerSize: App.Defaults.Header.size, footerSize: 0 }); this.createHeader(); this._subviews = []; // Wait for User to be resolved // App.Data.User.populated().then((function(){ this.createContent(); // }).bind(this)); this.add(this.layout); }
function PageView(options) { var that = this; View.apply(this, arguments); this.options = options; this.loadModels(); // create the layout this.layout = new HeaderFooterLayout({ headerSize: App.Defaults.Header.size, footerSize: App.Defaults.Footer.size }); this.createHeader(); this.createContent(); this.model.populated().then(function(){ // Add surfaces to content (buttons) that.addSurfaces(); // Sequence that.contentScrollView.sequenceFrom(that.contentScrollView.Views); // Show that.ContentController.show(that.contentScrollView); }); // Attach the main transform and the comboNode to the renderTree this.add(this.layout); }
function AppView() { View.apply(this, arguments); var starView = new StarView(); this.add(starView); }
function ChannelView() { View.apply(this, arguments); _createText.call(this); AddClearCoat(this, this.options.widtgh, this.options.height); //adds clear layer to handle scroll view touch this._eventInput.pipe(this._eventOutput); }
// Constructor function for our AppView class function MercuryView() { // Applies View's constructor function to AppView class View.apply(this, arguments); _planetMercury.call(this); }
function Article() { View.apply(this, arguments) this.model = this.options.model this.options.size = Article.getSize() this.scrollviewController = this.options.stream.scrollviewController this.initialize() this.setContent() }
function GymStripView() { View.apply(this, arguments); _createBackground.call(this); _createIcon.call(this); _createTitle.call(this); _setListeners.call(this); }
function saturday() { this.background = 'white'; this.purple = '#552D90'; this.grey = '#393939'; this.border = '1px solid #E5E5E5', View.apply(this, arguments); _init.call(this); }
function MenuView() { View.apply(this, arguments); _createBacking.call(this); _createMenuHeader.call(this); _setListeners.call(this); }
// CONSTRUCTOR /** * @param (object) options * - (int) stripWidth * - (int) stripHeight * - (int) topOffset * @return this */ function PageListView() { View.apply(this, arguments); _createStripListViews.call(this); this._eventInput.pipe(this._eventOutput); }
// Constructor function for our class function ScrollbarView() { // Applies View's constructor function to class View.apply(this, arguments); // make sure you invoke the helper function // in the right context by using .call() _createScroller.call(this); }
function HeaderView() { View.apply(this, arguments); _createBackground.call(this); _createBackButton.call(this); _createAddEventButton.call(this); _createDaysOfWeekBar.call(this); _setListeners.call(this); }
function StageView() { View.apply(this, arguments); this.worldScrollValue = 0; this._arrowData = this.options.arrowData; _setupScrollRecieverSurface.call(this); _handleScroll.call(this); _setupArrowKeyBreakpoints.call(this, 16, 60); }
function SlideView(options, data) { View.apply(this, arguments); _createLayout.call(this); _createHeader.call(this); _createBody.call(this); _createFooter.call(this); _setListeners.call(this); }
// Constructor function for our MenuController class function MenuController() { // Applies View's constructor function to MenuController class View.apply(this, arguments); this._items = this.options.items; this._itemMods = []; this.active = false; _createMainItem.call(this); _createItems.call(this); }
/** * A view for display various tabs that dispatch events * based on the id of the button that was clicked * * @class TabBar * @constructor * * @param {object} options overrides of deault options */ function TabBar(options) { View.apply(this, arguments); this.layout = new GridLayout(); this.buttons = []; this._buttonIds = {}; this._buttonCallbacks = {}; this.layout.sequenceFrom(this.buttons); this._add(this.layout); this._optionsManager.on('change', _updateOptions.bind(this)); }
function AppView() { View.apply(this, arguments); this.defaultAngle = Math.PI/3; this.size = [300,300]; this.angle = new Transitionable(this.defaultAngle); this.isToggled = false; _createBackground.call(this); _createBox.call(this); _setListener.call(this); }
function PageView(options) { // initialize, setup the Surfaces (and subviews?) var that = this; View.apply(this, arguments); this.options = options; // Add background var bgSurface = new Surface({ size: [undefined, undefined], classes: ['bg-surface'], properties: { background : "#eee", zIndex : "-1" } }); this.add(Transform.behind).add(bgSurface); // create the layout this.layout = new SequentialLayout(); // Build Surfaces var surfaces = []; this.boxSurface = new Surface({ size: [200,40], classes: ['button-surface'], content: 'Auth w/ Emailbox', properties: { lineHeight : "20px" } }); surfaces.push(this.boxSurface); this.boxSurface.on('click', this.login.bind(this)); this.layout.sequenceFrom(surfaces); var originMod = new StateModifier({ origin: [0.5, 0.5] }); // assign the layout to this view // - with a SizeModifier so that we can center everything this.add(new Modifier({ size: [undefined,undefined] })).add(originMod).add(this.layout); // // Model // this.model = new UserModel.User(); }
// GrideView constructor function // runs once for each new instance function GridView() { View.apply(this, arguments); this.rootModifier = new StateModifier({ size : this.options.size }); this.mainNode = this.add(this.rootModifier); var surf = new Surface({ size: this.size, properties:{ backgroundColor:"#FFFFFF" } }); _grid.call(this); }
function SideView(params) { var that = this; View.apply(this, arguments); this.params = params; if(this.params.model){ this.model = this.params.model; } this.open = false; // Background surface this.bgSurface = new Surface({ size: [undefined, undefined], content: "", properties: { backgroundColor: "white", zIndex: "-1" } }); this.bgSurface.on('swipe', (function(){ this._eventOutput.emit("menuToggle"); }).bind(this)); this.bgSurface.on('click', (function(){ this._eventOutput.emit("menuToggle"); }).bind(this)); this.hinge = new Modifier({ transform: Transform.thenMove(Transform.identity, [window.innerWidth + 100, 0, 0]) // rotateY(-Math.PI/2.5) }); // Create ScrollView this.contentScrollView = new ScrollView(App.Defaults.ScrollView); this.scrollSurfaces = []; this.modelSurfaces = {}; this.contentScrollView.sequenceFrom(this.scrollSurfaces); // Surfaces this.model.populated().then(function(){ that.updateSurfaces(); that.model.on('change', that.updateSurfaces.bind(that)); }); // Add modifiers var hingeNode = this._add(new Modifier({size : [200, undefined]})).add(new Modifier({origin : [0,0]})).add(this.hinge) hingeNode.add(this.bgSurface); hingeNode.add(this.contentScrollView); }
function HeaderView () { View.apply(this, arguments); this.renderController = new RenderController(); this.taskHeaderView = new View(); this.listHeaderView = new View(); _createBackground.call(this); _createTextHeader.call(this); _createBackButton.call(this); _bindEvents.call(this); this.add(this.renderController); }
/** * Infinite list. * * @param {Object} options overrides Stream.defaults * @api public */ function Stream() { View.apply(this, arguments) this.models = this.options.models this.views = _(this.options.views).clone() this.collection = this.options.collection this._initialViewsAmount = this.views.length this._initialViewsHeight = 0 this.views.forEach(function(view) { this._initialViewsHeight += view.getSize()[1] }, this) this._loading = false this._endReached = false this.initialize() }
/** * @class * @param {Object} options Options. * @param {Number} options.duration Default duration in msec for `panAndZoom` (default: 10000) * @param {Number} options.delay Default duration in msec for `delay` (default: 1000) * @param {Object} options.modifier Options that are passed to the internal `StateModifier` * @param {Object} options.containerSurface Options that are passed to the internal `ContainerSurface` * @alias module:KenBurnsContainer */ function KenBurnsContainer() { View.apply(this, arguments); // create container-surface this._containerSurface = new ContainerSurface(this.options.containerSurface); this._node.add(this._containerSurface); // create state-modifier for doing animations this.modifier = new StateModifier(this.options.modifier); this._renderable = this._containerSurface.add(this.modifier); // init this._newPosition = this.options.modifier.origin; this._newZoomScale = 1.0; }