Convert ol.render.Event#get* methods into properties

This commit is contained in:
Tom Payne
2014-01-23 20:21:55 +01:00
parent 37351c530c
commit df0912bdd3
13 changed files with 42 additions and 60 deletions

View File

@@ -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();
});