double trX = -1 * content.getX();
double trY = -1 * content.getY();
+ // NaNs
+ if(!Double.isFinite(trX)) trX = 0;
+ if(!Double.isFinite(trY)) trY = 0;
+
result.append(MAIN_SECTION, "<g transform=\"translate(");
result.append(MAIN_SECTION, "" + trX);
- result.append(MAIN_SECTION, " ");
+ result.append(MAIN_SECTION, ", ");
result.append(MAIN_SECTION, "" + trY);
- result.append(MAIN_SECTION, "\">");
+ result.append(MAIN_SECTION, ")\">");
result.append(SELECTION_SECTION, "<g class=\"selections\">");
parentBuilder2.append(SELECTION_SECTION, "\n</g>");
parentBuilder2.append(SELECTION_MASK_SECTION, "\n<g class=\"selectionMask\" id=\"" + key + "\">");
Rectangle2D rect = n.getRect();
- parentBuilder2.append(SELECTION_MASK_SECTION,"<rect style=\"fill:#fff\" opacity=\"0.001\"");
- parentBuilder2.append(SELECTION_MASK_SECTION," x=\"" + rect.getX() + "\" y=\"" + rect.getY() + "\"");
- parentBuilder2.append(SELECTION_MASK_SECTION," width=\"" + rect.getWidth() + "\" height=\"" + rect.getHeight() + "\"");
- parentBuilder2.append(SELECTION_MASK_SECTION,"></rect>");
+ // NaN
+ if(rect.getHeight() == rect.getHeight() && rect.getWidth() == rect.getWidth()) {
+ parentBuilder2.append(SELECTION_MASK_SECTION,"<rect style=\"fill:#fff\" opacity=\"0.001\"");
+ parentBuilder2.append(SELECTION_MASK_SECTION," x=\"" + rect.getX() + "\" y=\"" + rect.getY() + "\"");
+ parentBuilder2.append(SELECTION_MASK_SECTION," width=\"" + rect.getWidth() + "\" height=\"" + rect.getHeight() + "\"");
+ parentBuilder2.append(SELECTION_MASK_SECTION,"></rect>");
+ }
parentBuilder2.append(SELECTION_MASK_SECTION,"\n</g>");
}
} else if (node instanceof SVGNode) {