[Fixed Position] Add tests and fix checkstyle error.

Fixes #1496
This commit is contained in:
Pegah Sarram
2017-09-13 12:08:52 -07:00
parent 68abc15ed5
commit 740db8da75
5 changed files with 17 additions and 66 deletions

View File

@@ -256,8 +256,7 @@ define(
titled: true,
width: DEFAULT_DIMENSIONS[0],
height: DEFAULT_DIMENSIONS[1],
useGrid: true,
size: "14px"
useGrid: true
});
//Re-initialize objects, and subscribe to new object

View File

@@ -42,8 +42,7 @@ define(
},
"fixed.text": {
fill: "transparent",
stroke: "transparent",
size: "13px"
stroke: "transparent"
}
},
DIALOGS = {

View File

@@ -67,6 +67,10 @@ define(
*/
proxy.size = new AccessorMutator(element, 'size');
if (proxy.size() === undefined) {
proxy.size("13px");
}
return proxy;
}

View File

@@ -57,6 +57,14 @@ define(
expect(proxy.size('12px')).toEqual('12px');
expect(proxy.size()).toEqual('12px');
});
it("defaults to 13px for unspecified text size", function () {
testElement = {x: 1, y: 2};
proxy = new TextProxy(testElement, 0, [testElement]);
expect(proxy.size()).toEqual('13px');
});
});
}
);