Phil 6.24.15

9:30 – 5:00 SR

  • For a break, I’m going to build a directive that pops up in response to a NovettaUtils.ATSMessenger event. Also going to look into using flex containers for the WebGl
  • Took a much-needed detour into handling resize events so more advanced CSS can be supported. . It works like this:
    • First, set up the callback. Not that it is attached to the window, not an element in the scope.
      window.addEventListener('resize', this.handleResizeEvent, false);
    • Then we have the event handler
      private handleResizeEvent(ev:Event):void{
          var parent = this.getTopNode();
              this.renderer.setSize(this.adjWidth, this.adjHeight);
              if(this.getUse3D()) {
                  var pcam:THREE.PerspectiveCamera = <THREE.PerspectiveCamera>(;
                  pcam.aspect = this.getAdjWidth() / this.getAdjHeight();
                  var ocam:THREE.OrthographicCamera = <THREE.OrthographicCamera>(;
                  ocam.right = this.getAdjWidth();
         = this.getAdjHeight();
    • How to center a absolute div
    • Ok, got the basics of the pop-up directive working in a dynamic viewport!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.