Phil 2.27.15

7:30 – 5:30 SR

  • So far the only problem with the new FR app seems to be that people want to use old browser versions, so we’ll need to add a browser test and some kind of splash page.
  • Tooltips? I wonder if I can use angular.element to make that work?
  • Well I spent the whole morning chasing down bugs that turned out to be a bad merge. I think with TypeScript you may have to use the ‘force update’ option and prevent merging altogether. On the plus side, I managed to remove circular references for the CanvasBase and ComponentBase classes by creating a new file for WebGlInterfaces that has the interfaces for both modules. So now at the top of each of the Canvas and Component modules is
    /// <reference path="WebGlInterfaces.d.ts" />

    and that seems to solve that problem

  • Tooltips are now working. Had to write a StyleElement class – it was easier than manipulating the style directly, and this way I was able to use the YUI calls that were in the old code:
    export class StyleElement {
        element:HTMLElement;
        x:number;
        y:number;
        hidden:string;
    
        constructor(e:HTMLElement){
            this.element = e;
            this.x = 0;
            this.y = 0;
            this.hidden = 'visible';
        }
        get(arg:string):any{
            var rval:any = this;
            return rval[arg];
        }
        getX():number{
            return this.x;
        }
        getY():number{
            return this.y;
        }
        setXY(args:number[]){
            this.x = args[0];
            this.y = args[1];
            this.toStyle();
        }
        setHTML(text:string){
            this.element.textContent = text;
        }
        show():void{
            this.hidden = 'visible';
            this.toStyle();
        }
        hide():void{
            this.hidden = 'hidden';
            this.toStyle();
    
        }
    
        isHidden():boolean{
            return (this.hidden === 'hidden');
        }
        toggleView():void{
            if(this.hidden === 'hidden'){
                this.hidden = 'visible';
            }else{
                this.hidden = 'hidden';
            }
            this.toStyle();
        }
        toStyle():void{
            var styleStr = 'left: '+this.x+'px; top:'+this.y+'px; visibility: '+this.hidden;
            this.element.setAttribute("style", styleStr);
            //console.log(this.element.getAttribute("style"));
        }
    }
  • I am now kind of paranoid about subversion and am now making full backup copies, since I basically had to do that to restore the project after I realized what happened.
  • And as I was testing against browsers, I found that tooltips didn’t work right on FF. That led me down a rabbit hole described in more detail in my blog.
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: