diff --git a/src/mixins/canvas_dataurl_exporter.mixin.js b/src/mixins/canvas_dataurl_exporter.mixin.js index 402697e9f61..f65775b84fd 100644 --- a/src/mixins/canvas_dataurl_exporter.mixin.js +++ b/src/mixins/canvas_dataurl_exporter.mixin.js @@ -59,7 +59,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati this.renderAll(); - var canvasEl = this.lowerCanvasEl, + var canvasEl = this.contextContainer.canvas, croppedCanvasEl = this.__getCroppedCanvas(canvasEl, cropping); // to avoid common confusion https://github.com/kangax/fabric.js/issues/806 diff --git a/test/unit/canvas_static.js b/test/unit/canvas_static.js index 17b202529d7..72b0b61282e 100644 --- a/test/unit/canvas_static.js +++ b/test/unit/canvas_static.js @@ -40,8 +40,6 @@ '"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,'+ '"shadow":null,"visible":true,"clipTo":null,"backgroundColor":"","fillRule":"nonzero","globalCompositeOperation":"source-over","transformMatrix":null,"skewX":0,"skewY":0,"padding":123,"foo":"bar","rx":0,"ry":0}],"background":""}'; - var CANVAS_WITH_RED_RECT_DATA = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAJYCAYAAAC+ZpjcAAAgAElEQVR4Xu3ZQY7lRhIFweqTj3RyzUYCapsE0pHAs15/MhgWG0fXn39+fv73499TAn9+fv5+6oN8DAECBAgQIHAk8OffwPrr6Ck/vinwl8C6yevdBAgQIEDgvoDAum98OkFgnYr5PQECBAgQeExAYD12kJ+fH4H13k18EQECBAgQOBIQWEdcyY8FVsJsCAECBAgQuCcgsO7Zfn2zwPoq5zkCBAgQIPCIgMB65BC/PkNgvXcTX0SAAAECBI4EBNYRV/JjgZUwG0KAAAECBO4JCKx7tl/fLLC+ynmOAAECBAg8IiCwHjmEPxG+dwhfRIAAAQIEvgoIrK9y957zP1j3bL2ZAAECBAgkAgIrYT4aIrCOuPyYAAECBAi8JyCw3ruJwHrvJr6IAAECBAgcCQisI67k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65UECBAgQIBAJPAnmmMMAQIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQCRW+m8AAAJCSURBVGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRkBgTVzaosSIECAAAEClYDAqqTNIUCAAAECBGYEBNbMqS1KgAABAgQIVAICq5I2hwABAgQIEJgREFgzp7YoAQIECBAgUAkIrEraHAIECBAgQGBGQGDNnNqiBAgQIECAQCUgsCppcwgQIECAAIEZAYE1c2qLEiBAgAABApWAwKqkzSFAgAABAgRmBATWzKktSoAAAQIECFQCAquSNocAAQIECBCYERBYM6e2KAECBAgQIFAJCKxK2hwCBAgQIEBgRkBgzZzaogQIECBAgEAlILAqaXMIECBAgACBGQGBNXNqixIgQIAAAQKVgMCqpM0hQIAAAQIEZgQE1sypLUqAAAECBAhUAgKrkjaHAAECBAgQmBEQWDOntigBAgQIECBQCQisStocAgQIECBAYEZAYM2c2qIECBAgQIBAJSCwKmlzCBAgQIAAgRmB/wPPQS9olhz3SwAAAABJRU5ErkJggg=='; - function getAbsolutePath(path) { var isAbsolute = /^https?:/.test(path); if (isAbsolute) return path; @@ -454,8 +452,8 @@ // this.assertIdentical(emptyImageCanvasData, canvas.toDataURL('png')); equal(typeof dataURL, 'string'); equal(dataURL.substring(0, 21), 'data:image/png;base64'); - //to be fixed. - //equal(dataURL, CANVAS_WITH_RED_RECT_DATA); + //we can just compare that the dataUrl generated differs from the dataURl of an empty canvas. + equal(dataURL.substring(200, 210) != 'AAAAAAAAAA', true); } });