Convert ol.render.Event#get* methods into properties
This commit is contained in:
@@ -48,7 +48,7 @@ $(map.getViewport()).on('mousemove', function(evt) {
|
||||
|
||||
// before rendering the layer, do some clipping
|
||||
imagery.on('precompose', function(event) {
|
||||
var ctx = event.getContext();
|
||||
var ctx = event.context;
|
||||
ctx.save();
|
||||
ctx.beginPath();
|
||||
if (mousePosition) {
|
||||
@@ -63,6 +63,6 @@ imagery.on('precompose', function(event) {
|
||||
|
||||
// after rendering the layer, restore the canvas context
|
||||
imagery.on('postcompose', function(event) {
|
||||
var ctx = event.getContext();
|
||||
var ctx = event.context;
|
||||
ctx.restore();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user