rename _ol_math_ imports
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_Object_ from '../Object.js';
|
||||
import _ol_layer_Property_ from '../layer/Property.js';
|
||||
import _ol_math_ from '../math.js';
|
||||
import {clamp} from '../math.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
|
||||
/**
|
||||
@@ -76,7 +76,7 @@ _ol_layer_Base_.prototype.getType = function() {
|
||||
* @return {ol.LayerState} Layer state.
|
||||
*/
|
||||
_ol_layer_Base_.prototype.getLayerState = function() {
|
||||
this.state_.opacity = _ol_math_.clamp(this.getOpacity(), 0, 1);
|
||||
this.state_.opacity = clamp(this.getOpacity(), 0, 1);
|
||||
this.state_.sourceState = this.getSourceState();
|
||||
this.state_.visible = this.getVisible();
|
||||
this.state_.extent = this.getExtent();
|
||||
|
||||
@@ -6,7 +6,7 @@ import {inherits} from '../index.js';
|
||||
import _ol_Object_ from '../Object.js';
|
||||
import {createCanvasContext2D} from '../dom.js';
|
||||
import _ol_layer_Vector_ from '../layer/Vector.js';
|
||||
import _ol_math_ from '../math.js';
|
||||
import {clamp} from '../math.js';
|
||||
import _ol_obj_ from '../obj.js';
|
||||
import RenderEventType from '../render/EventType.js';
|
||||
import _ol_style_Icon_ from '../style/Icon.js';
|
||||
@@ -111,7 +111,7 @@ var Heatmap = function(opt_options) {
|
||||
|
||||
this.setStyle(function(feature, resolution) {
|
||||
var weight = weightFunction(feature);
|
||||
var opacity = weight !== undefined ? _ol_math_.clamp(weight, 0, 1) : 1;
|
||||
var opacity = weight !== undefined ? clamp(weight, 0, 1) : 1;
|
||||
// cast to 8 bits
|
||||
var index = (255 * opacity) | 0;
|
||||
var style = this.styleCache_[index];
|
||||
|
||||
Reference in New Issue
Block a user