Fix image-filter example using right postrender events

This commit is contained in:
Florent gravin
2018-11-16 09:59:23 +01:00
committed by Tim Schaub
parent c5b7c5febb
commit 160e9e8056
2 changed files with 4 additions and 4 deletions

View File

@@ -3,9 +3,9 @@ layout: example.html
title: Image Filters
shortdesc: Apply a filter to imagery
docs: >
<p>Layer rendering can be manipulated in <code>precompose</code> and <code>postcompose</code> event listeners.
<p>Layer rendering can be manipulated in <code>prerender</code> and <code>postrender</code> event listeners.
These listeners get an event with a reference to the Canvas rendering context.
In this example, the <code>postcompose</code> listener applies a filter to the image data.</p>
In this example, the <code>postrender</code> listener applies a filter to the image data.</p>
tags: "filter, image manipulation"
cloak:
- key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5

View File

@@ -90,9 +90,9 @@ select.onchange = function() {
/**
* Apply a filter on "postcompose" events.
* Apply a filter on "postrender" events.
*/
imagery.on('postcompose', function(event) {
imagery.on('postrender', function(event) {
convolve(event.context, selectedKernel);
});