I tried implementing an iframe within a surface.
/* globals define */
define(function(require, exports, module) {
'use strict';
// import dependencies
var Engine = require('famous/core/Engine');
var Modifier = require('famous/core/Modifier');
var Transform = require('famous/core/Transform');
var Surface = require('famous/core/Surface');
var mainContext = Engine.createContext();
var content = 'abc';
var logo = new Surface({
size: [undefined, undefined],
content: '<iframe width=1024 height=768 src="http://www.bbc.com"></iframe>'
});
var centerModifier = new Modifier({
origin: [0, 0]
});
centerModifier.setTransform(Transform.scale(.5,.5,0));
mainContext.add(centerModifier).add(logo);
});
The scroll seems to freez up if i scale it. Anyone had used iframe surface with Famou.us. Its not included in the library yet.
It looks like you are scaling the z infinitesimally small with..
It should be changed to..
Good Luck!
You can easily create new elements:
Usage:
The z-transform as mentioned is an issue. Just for the record iframes work fine in famo.us. I'm using multiple animating iframes without issue. Almost any HTML can go in a surface so there's no need for a specialist iframe surface really.