dist/jcanvas.js
function _restoreCanvas(ctx, data) {
	if (data.savedTransforms.length === 0) {
		// Reset transformation state if it can't be restored any more
		data.transforms = _cloneTransforms(baseTransforms);
	} else {
		// Restore canvas context
		ctx.restore();
		// Restore current transform state to the last saved state
		data.transforms = data.savedTransforms.pop();
	}
}
function _restoreCanvas(ctx, data) {
	if (data.savedTransforms.length === 0) {
		// Reset transformation state if it can't be restored any more
		data.transforms = _cloneTransforms(baseTransforms);
	} else {
		// Restore canvas context
		ctx.restore();
		// Restore current transform state to the last saved state
		data.transforms = data.savedTransforms.pop();
	}
}
function _restoreCanvas ( ctx , data ) { if ( data . savedTransforms . length === 0 ) { // Reset transformation state if it can't be restored any more data . transforms = _cloneTransforms ( baseTransforms ) ; } else { // Restore canvas context ctx . restore ( ) ; // Restore current transform state to the last saved state data . transforms = data . savedTransforms . pop ( ) ; } }
Restore canvas context update transformation stack
Restore canvas context update transformation stack