catch empty trails log when trying to generate a vector trails costume

pull/89/head
jmoenig 2019-12-02 17:00:34 +01:00
rodzic 6d5ddad06c
commit b99d32618f
2 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -14,6 +14,7 @@
* threads: new "pen trails (SVG)" reporter (experimental, hidden in dev)
* objects, threads: adjusted rotation center of SVG-pen-trails
* objects: added aspect racio governance and generator tags to trails SVGs
* threads: catch empty trails log when trying to generate a vector trails costume
## v5.3.8:
* **Notable Change:**

Wyświetl plik

@ -5118,6 +5118,11 @@ Process.prototype.reportPentrailsAsSVG = function () { // +++
if (!this.context.accumulator) {
stage = this.homeContext.receiver.parentThatIsA(StageMorph);
if (!stage.trailsLog.length) {
throw new Error (localize(
'there are currently no\nvectorizable pen trail segments'
));
}
svg = stage.trailsLogAsSVG();
this.context.accumulator = {
img : new Image(),