﻿// JScript File
// Model for TNRISShape
TNRIS.TNRISShape = function(config) {
    Ext.apply(this, config);

    this.ID = null;
    this.name = null;
    this.desc= null;
    this.custAttribs = null;
    this.VEShapeID = null;
    this.VEShape = null;
    this.shapeArray = null;
    this.shapeType = null;
    this.origLineColor = null;
    this.origFillColor = null;
    this.newLineColor = null;
    this.newFillColor = null;
    
};

Ext.apply(TNRIS.TNRISShape, 
    /** @scope TNRIS.TNRISShape */
    {
    drawShape: function(shapeLayer) {
        if (shapeLayer == null) {
            shapeLayer = this.getActiveLayer();
        }
        var shape = new VEShape();
        shape.SetPoints(this.shapeArray);
        shape.shapeType = this.shapeType;
        //shape.SetDescription = this.getDescription();
        shapeLayer.AddShape(shape);
        this.VEShapeID = shape.GetID();
        this.VEShape = shape;
    },
    
    getDescription: function() {
        return;
        /*
        if (null != this.custAttribs) {
            //build div tag information from the attributes
        }
        */
    },
    
    setDescription: function(arrayAttributes) {
        return;
        /*
        process array and costruct the xml
        var tXML = null;
        this.custAttribs = tXML;
        return this.custAttribs;
        */
    },
    
    setShapeArray: function() {
        return;
        /*if (null != this.VEShape) {
            this.shapeArray = this.VEShape.GetPoints();
        }
        return this.shapeArray;
        */
    }
});

if (typeof(Sys) !== "undefined") { Sys.Application.notifyScriptLoaded(); }
