Updates from pull request code review. Refactored getExtraAttributesForConvertToPath.

Updated all formatting requests.
Refactored and renamed addAttributesForConvertToPath to
getExtraAttributesForConvertToPath. Now called from
getBBoxOfElementAsPath and convertToPath.
This commit is contained in:
Flint O'Brien
2016-04-26 16:01:39 -04:00
parent 17c3e0fa28
commit 7db3b22c58
3 changed files with 70 additions and 51 deletions

View File

@@ -165,8 +165,9 @@ svgedit.select.Selector.prototype.resize = function(bbox) {
m.e *= current_zoom;
m.f *= current_zoom;
if (!bbox)
if (!bbox) {
bbox = svgedit.utilities.getBBox(selected);
}
// TODO: svgedit.utilities.getBBox (previous line) already knows to call getStrokedBBox when tagName === 'g'. Remove this?
// TODO: svgedit.utilities.getBBox doesn't exclude 'gsvg' and calls getStrokedBBox for any 'g'. Should getBBox be updated?
if (tagName === 'g' && !$.data(selected, 'gsvg')) {