Coder Social home page Coder Social logo

animator's People

Contributors

jouni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

animator's Issues

Add removeListener method to AnimationProxy

Add removeListener(AnimationListener) method to AnimationProxy to provide a symmetric API.

Plus, as AnimatorProxy is a descendant of Component, AnimationListener needs to extend the Component.Listener interface, so it can be passed to Component.removeListener(Component.Listener). (via @marlonrichert)

AnimatorProxy is missing removeListener(AnimationListener)

AnimatorProxy needs a removeListener(AnimationListener) method. Plus, as AnimatorProxy is a descendant of Component, AnimationListener needs to extend the Component.Listener interface, so it can be passed to Component.removeListener(Component.Listener).

(2.0) Design for extensibility

Hi again,
Found it rather impossible to extend Animator as it stands because the constructor is private. I appreciate the cleanliness of the static.animate() pattern but I'll need to attach some listeners to do stuff when the animations are complete which I can't see how I can do right now?

Thanks,
Peter

ROLL_RIGHT_CLOSE option

A roll right close option is needed

    ROLL_RIGHT_CLOSE
    /**
     * Close the target by clipping it with a mask moving from left to right.
     * Removes the component from its parent layout after the animation is
     * finished.
     */

From posting:
So regarding the right close animation, would you like the animation to move the curtain from the left edge of the component to the right edge while simultaneously keeping the components right edge in place (i.e. not moving the left side of the component, only clipping the component visually from the left to right)?

ROLL_LEFT_OPEN option

For the Left Open, the component should be in place and fully hidden at the start, and the curtain should reveal from right to left.

    ROLL_LEFT_OPEN,
    /**
     * Reveals the target by clipping it with a mask moving to the left.
     */

AnimatorProxy NullPointerException

Hi all,
I had an exception using AnimatorProxy as shown in the following:

Grave: Terminal error:
java.lang.NullPointerException
at org.vaadin.jouni.animator.AnimatorProxy.changeVariables(AnimatorProxy.java:170)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1460)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1404)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1329)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:761)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:95)
at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

I tried to debug my application but it seems that it's all ok.
Can anyone get me further information about the cause of this exception?

Thanks in advance

Does it work with Vaadin 7.1.7?

I see comments about error:

Widgetset does not contain implementation for org.vaadin.jouni.animator.server.AnimatorProxy

Does it work now?

Thanks.

Able to know when the animation is finished

Hi,

I am unable to know when the animation is finished as I need to do stuff as soon as it's done.

Will it be possible to add functionality e.g. be able to add the AnimationEndListener.

Cannot use methods 'add/removeListener' of Animator' class

The class 'Animator' of 'animator-2.0.0' has a

  • private constructor
  • some static methods for animation, but no one return the 'Animator' instance

But to call the non-static public methods I need an 'Animator' instance.
See vaadinanimator-publicclassesnotusable

Requirement: either remove these methods or make them usable. Or is there a trick to use them?

Size animation moves layout 1px up each time

If we move layout back and forth in X direction it rises 1px up each time. So we need y+=1 to compensate it.

public void onOpenThird() {
    view.getAnimator().animate((HorizontalLayout) view, AnimType.SIZE).setDuration(150)
            .setData("width=+450,x=-450,y=+1");
    view.getAnimator().animate(view.getRightContent(), AnimType.FADE_IN).setDuration(150).setDelay(150);
}
public void onCloseThird() {
    view.getAnimator().animate(view.getRightContent(), AnimType.FADE_OUT).setDuration(150);
    view.getAnimator().animate((HorizontalLayout) view, AnimType.SIZE).setDuration(150)
            .setData("width=-450,x=+450,y=+1").setDelay(150);
}

Feature: (2.0) Chaining animations

Hi Jouni,
Great add-on, thank you!

I'm playing around with the 2.0 version and would really love to be able to chain transformations with a specified delay between each. I'll try and see if I can achieve that by sub-classing around a bit but perhaps something to put on your radar as a cool addition!

Thanks,
Peter

Consider using velocity.js instead of custom transition/animation code

Velocity.js should be as performant or better than CSS transitions and animations.

The benefits of using velocity.js

  • a high-profile project with regular updates and a lot of testers
  • works with IE8 and IE9 as well
  • has a more flexible API to expose to the server side
    • probably a bit faster in some situations, as said on the website

The cons of using velocity.js

  • requires jQuery (32kb minified+gzipped) + 7kb of additional JS

Profiling an application using AnimatorProxy can give false negatives

If you profile an application which uses the AnimatorProxy component using a server-side only tool (such as JMeter), the memory usage of the app will grow uncontrollably.

This is because the AnimatorProxy depends on messages sent from the client back to the server for it to clean up references to the animations. So in real use, such memory leaks will not be present.

The place in code where the cleanup is done: https://github.com/jounikoivuviita/Animator/blob/master/src/org/vaadin/jouni/animator/AnimatorProxy.java#L155

Add support for Google App Engine

Please implement Serializable on all your classes.
And also, Animation objects may exceed 1MB in size, which is not allowed in memcache in Google App Engine. In this case, a terminal error is thrown through Vaadin and which is hard to recover from in the application.

Animation on the table cell content

Currently it's working not so good, as expected.
Cell roll_up and roll_down is looking good, but at the same time table resizing is poor.
Is it planned to implement?

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.