kopia lustrzana https://github.com/backface/turtlestitch
				
				
				
			VectorPaint: fixed initial rendering
so costumes can be re-opened after saving / exporting and re-loading the projectupd4.2
							rodzic
							
								
									9dde6a4fd8
								
							
						
					
					
						commit
						7bf5bf9ff7
					
				| 
						 | 
				
			
			@ -4123,3 +4123,4 @@ in development:
 | 
			
		|||
180605
 | 
			
		||||
------
 | 
			
		||||
* VectorPaint: fixed rotation center editing for existing costumes
 | 
			
		||||
* VectorPaint: fixed initial rendering, so costumes can be re-opened after saving
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -46,8 +46,10 @@
 | 
			
		|||
    Bernat Romagosa rewrote most of the code in 2017
 | 
			
		||||
 | 
			
		||||
    revision history
 | 
			
		||||
    ----------------
 | 
			
		||||
    2018, June 5 - fixed initial rotation center for an existing costume (Jens)
 | 
			
		||||
    -----------------
 | 
			
		||||
    2018, June 5
 | 
			
		||||
        - fixed initial rotation center for an existing costume (Jens)
 | 
			
		||||
        - fixed initial rendering, so costumes can be re-opened after saving
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
/*global Point, Object, Rectangle, AlignmentMorph, Morph, XML_Element, nop,
 | 
			
		||||
| 
						 | 
				
			
			@ -995,17 +997,19 @@ VectorPaintEditorMorph.prototype.openIn = function (world, oldim, oldrc, callbac
 | 
			
		|||
        isEmpty = isNil(shapes) || shapes.length === 0;
 | 
			
		||||
 | 
			
		||||
    VectorPaintEditorMorph.uber.openIn.call(this, world, null, oldrc, callback);
 | 
			
		||||
 | 
			
		||||
    this.shapes = shapes.map(function (eachShape) { return eachShape.copy(); });
 | 
			
		||||
    this.ide = anIDE;
 | 
			
		||||
 | 
			
		||||
    this.paper.drawNew();
 | 
			
		||||
    this.paper.changed();
 | 
			
		||||
 | 
			
		||||
    // make sure shapes are initialized and can be rendered
 | 
			
		||||
    shapes.forEach(function (shape) {
 | 
			
		||||
        shape.drawOn(myself.paper);
 | 
			
		||||
    });
 | 
			
		||||
    // copy the shapes for editing and re-render the copies
 | 
			
		||||
    this.shapes = shapes.map(function (eachShape) { return eachShape.copy(); });
 | 
			
		||||
    this.shapes.forEach(function (shape) {
 | 
			
		||||
        shape.drawOn(myself.paper);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // init the rotation center, if any
 | 
			
		||||
    if (oldrc && !isEmpty) {
 | 
			
		||||
        this.paper.automaticCrosshairs = false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue