|
11 | 11 | var createPointCloudRenderer = require('gl-pointcloud2d'); |
12 | 12 |
|
13 | 13 | var str2RGBArray = require('../../lib/str2rgbarray'); |
14 | | -var expandAxis = require('../../plots/cartesian/autorange').expand; |
| 14 | +var findExtremes = require('../../plots/cartesian/autorange').findExtremes; |
15 | 15 | var getTraceColor = require('../scatter/get_trace_color'); |
16 | 16 |
|
17 | 17 | function Pointcloud(scene, uid) { |
@@ -195,14 +195,11 @@ proto.updateFast = function(options) { |
195 | 195 | this.pointcloud.update(this.pointcloudOptions); |
196 | 196 |
|
197 | 197 | // add item for autorange routine |
198 | | - this.expandAxesFast(bounds, markerSizeMax / 2); // avoid axis reexpand just because of the adaptive point size |
199 | | -}; |
200 | | - |
201 | | -proto.expandAxesFast = function(bounds, markerSize) { |
202 | | - var pad = markerSize || 0.5; |
203 | | - |
204 | | - expandAxis(this.scene.xaxis, [bounds[0], bounds[2]], {ppad: pad}); |
205 | | - expandAxis(this.scene.yaxis, [bounds[1], bounds[3]], {ppad: pad}); |
| 198 | + var xa = this.scene.xaxis; |
| 199 | + var ya = this.scene.yaxis; |
| 200 | + var pad = markerSizeMax / 2 || 0.5; |
| 201 | + options._extremes[xa._id] = findExtremes(xa, [bounds[0], bounds[2]], {ppad: pad}); |
| 202 | + options._extremes[ya._id] = findExtremes(ya, [bounds[1], bounds[3]], {ppad: pad}); |
206 | 203 | }; |
207 | 204 |
|
208 | 205 | proto.dispose = function() { |
|
0 commit comments