DiagramElement.prototype.withPos = function (x, y) {
        if (x && y) {
            this.$pos = new Point(x, y);
        }
        else {