Commit 461a6c46 authored by tebjan's avatar tebjan
Browse files

Merge remote-tracking branch 'origin/master' into textEvents

parents 75aa629d 9294fa77
......@@ -25,7 +25,32 @@ namespace Svg
get { return this._offset; }
set
{
this._offset = value.ToPercentage();
SvgUnit unit = value;
if (value.Type == SvgUnitType.Percentage)
{
if (value.Value > 100)
{
unit = new SvgUnit(value.Type, 100);
}
else if (value.Value < 0)
{
unit = new SvgUnit(value.Type, 0);
}
}
else if (value.Type == SvgUnitType.User)
{
if (value.Value > 1)
{
unit = new SvgUnit(value.Type, 1);
}
else if (value.Value < 0)
{
unit = new SvgUnit(value.Type, 0);
}
}
this._offset = unit.ToPercentage();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment