[Fixed Position] Allow straight lines
Pad width/height to give enough space to draw straight lines; fix usage of background for boxes. WTD-880.
This commit is contained in:
@@ -12,10 +12,10 @@ define(
|
||||
border: "transparent"
|
||||
},
|
||||
"fixed.line": {
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 5,
|
||||
y2: 3
|
||||
x: 5,
|
||||
y: 9,
|
||||
x2: 6,
|
||||
y2: 6
|
||||
},
|
||||
"fixed.text": {
|
||||
fill: "transparent",
|
||||
|
||||
@@ -32,11 +32,11 @@ define(
|
||||
};
|
||||
|
||||
proxy.width = function () {
|
||||
return Math.max(element.x, element.x2) - proxy.x();
|
||||
return Math.max(Math.abs(element.x - element.x2), 1);
|
||||
};
|
||||
|
||||
proxy.height = function () {
|
||||
return Math.max(element.y, element.y2) - proxy.y();
|
||||
return Math.max(Math.abs(element.y - element.y2), 1);
|
||||
};
|
||||
|
||||
proxy.x1 = function () {
|
||||
|
||||
Reference in New Issue
Block a user