Giter Site home page Giter Site logo

cast's People

Contributors

bmcmahen avatar seano314 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cast's Issues

Cannot read property 'clientWidth' of undefined

Using Meteor 0.8.1.1, an error occurs when we have

Template.cast.rendered = function(){

    var myCast = new cast();

})

Trace:

Exception from Deps afterFlush function function: TypeError: Cannot read property 'clientWidth' of undefined
    at new Cast (http://localhost:3000/client/lib/cast.js?09f5c38d83c9ac871ec3d5f08d58063cd517753b:694:59)
    at Object.Template.cast.rendered (http://localhost:3000/client/views/main/main.js?d2fe801001ae6ec5b7fc35108daaf489a7e7bd40:31:15)
    at http://localhost:3000/packages/ui.js?f0696b7e9407b8f11e5838e7e7820e9b6d7fc92f:426:23
    at _assign.flush (http://localhost:3000/packages/deps.js?91f1235baecd83915f7d3a7328526dbba41482be:345:13) 

Similar error occurs when we use:

var el = document.getElementById('#cast');
var mycast = cast(el);
mycast.draw(renderTemplate);

Trace:

Uncaught TypeError: Cannot read property 'clientWidth' of undefined cast.js?09f5c38d83c9ac871ec3d5f08d58063cd517753b:694
Cast cast.js?09f5c38d83c9ac871ec3d5f08d58063cd517753b:694
Cast cast.js?09f5c38d83c9ac871ec3d5f08d58063cd517753b:682
(anonymous function) main.js?7cbfb50c9595b6864936d354e93935963eeaccd3:26
(anonymous function)    

nicer api

i'm not a fan of the big options objects anymore, at least for the constructor. We should also expect a dom element for the wrapper instead of specifying a String.

ensure ie 9 support, or detect when transitions aren't present

right now, we utilize the afterTransition utility to remove an element from the dom once it has finished animating. I suspect this probably works fine in ie8 & 9 since transitions aren't supported, but what about if we don't want transitions in a transition enabled browser? it leaves elements in the dom

change render api

Allow use of a callback to add more flexibility to rendering.

cast.render(function(el, doc){
   if (doc.image) {
     return 'some template string';
  } 
  return 'another template string';
});

model render api after component/infinite

basically you can provide additional arguments, and it calls back every time something is rendered. leave the 'changed' and rendering function up to the user, then... this will make this lib a bit lighter that way, too.

don't muddy attributes w/ positions

when we pass in attributes and we call a layout method, the top, left, attributes are added to the attributes listing. then, when we call 'toJSON()' those positional attributes are included. we should probably keep a separate list of positional attributes.

layout calculations deserve their own component

often you'll just want to pass an array into one layout mode, instead of using the views and models that come with cast. we can still offer cast as a bigger library, but we it should be made up of multiple components...

rewrite views

i wrote those a long time ago, and they need some work...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.