Skip to content

Commit

Permalink
Update mapd-draw dependency to latest commit (#604)
Browse files Browse the repository at this point in the history
* Point mapd-draw to the latest commit. This required updating all
mapd-draw-related import statements to pull from the re-branded
draw bundle.
  • Loading branch information
Christopher Root authored Nov 29, 2022
1 parent 4896c4c commit 4b68670
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 94 deletions.
132 changes: 66 additions & 66 deletions dist/charting.js

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@
},
"dependencies": {
"@heavyai/data-layer": "npm:mapd-data-layer-2@0.0.25",
"@heavyai/draw": "https://github.com/omnisci/mapd-draw.git#85f440f",
"@heavyai/draw": "https://github.com/heavyai/mapd-draw.git#fc0b065",
"@mapbox/unitbezier": "0.0.0",
"@mapd/connector": "github:omnisci/mapd-connector#d75148077a2a4b23d66d89c63d05c20e5735af2e",
"@mapd/crossfilter": "github:omnisci/mapd-crossfilter#6f291ac",
"@mapd/mapd-draw": "git+https://github.com/omnisci/mapd-draw.git#85f440f",
"@turf/bbox": "^6.5.0",
"@turf/bbox-clip": "^6.5.0",
"axios": "^0.19.2",
Expand Down
10 changes: 5 additions & 5 deletions src/charts/raster-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,18 +696,18 @@ export default function rasterChart(parent, useMap, chartGroup, _mapboxgl) {
callback,
fetchEvenIfEmpty = false
) {
if (!point) {
return
}

const height =
typeof _chart.effectiveHeight === "function"
? _chart.effectiveHeight()
: _chart.height()
const pixelRatio = _chart._getPixelRatio() || 1
const pixel = new TPixel({
const pixel = {
x: Math.round(point.x * pixelRatio),
y: Math.round((height - point.y) * pixelRatio)
})

if (!point) {
return
}

let cnt = 0
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/raster-draw-mixin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as LatLonUtils from "../utils/utils-latlon"
import LassoButtonGroupController from "./ui/lasso-tool-ui"
import * as _ from "lodash"
import * as Draw from "@heavyai/draw/dist/mapd-draw"
import * as Draw from "@heavyai/draw/dist/draw"
import { redrawAllAsync } from "../core/core-async"
import LatLonCircle from "./ui/lasso-shapes/LatLonCircle"
import LatLonPoly from "./ui/lasso-shapes/LatLonPoly"
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/raster-layer-mesh2d-mixin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from "assert"
import { parser } from "../utils/utils"
import { AABox2d } from "@heavyai/draw/dist/mapd-draw"
import { AABox2d } from "@heavyai/draw/dist/draw"
import { lastFilteredSize } from "../core/core-async"
import { createRasterLayerGetterSetter } from "../utils/utils-vega"
import { isValidPostFilter } from "./raster-layer-point-mixin"
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/raster-layer-point-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from "../utils/utils-vega"
import { parser } from "../utils/utils"
import * as d3 from "d3"
import { AABox2d, Point2d } from "@heavyai/draw/dist/mapd-draw"
import { AABox2d, Point2d } from "@heavyai/draw/dist/draw"

const AUTOSIZE_DOMAIN_DEFAULTS = [100000, 0]
const AUTOSIZE_RANGE_DEFAULTS = [2.0, 5.0]
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/raster-layer-windbarb-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { lastFilteredSize } from "../core/core-async"
import { createRasterLayerGetterSetter } from "../utils/utils-vega"
import { parser } from "../utils/utils"
import { AGGREGATES, isValidPostFilter } from "./raster-layer-point-mixin"
import { AABox2d } from "@heavyai/draw/dist/mapd-draw"
import { AABox2d } from "@heavyai/draw/dist/draw"
import {
ColorChannelDescriptor,
OpacityChannelDescriptor,
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/raster-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
createRasterLayerGetterSetter,
createVegaAttrMixin
} from "../utils/utils-vega"
import { AABox2d, Point2d } from "@heavyai/draw/dist/mapd-draw"
import { AABox2d, Point2d } from "@heavyai/draw/dist/draw"
import moment from "moment"

const validLayerTypes = [
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/ui/lasso-shapes/LatLonCircle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict"

import * as LatLonUtils from "../../../utils/utils-latlon"
import * as Draw from "@heavyai/draw/dist/mapd-draw"
import * as Draw from "@heavyai/draw/dist/draw"
import LatLonViewIntersectUtils from "./LatLonViewIntersectUtils"

const { AABox2d, Mat2d, Point2d, Vec2d } = Draw
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/ui/lasso-shapes/LatLonPoly.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict"

import * as LatLonUtils from "../../../utils/utils-latlon"
import * as Draw from "@heavyai/draw/dist/mapd-draw"
import * as Draw from "@heavyai/draw/dist/draw"
import LatLonViewIntersectUtils from "./LatLonViewIntersectUtils"

const { AABox2d, Mat2d, Point2d } = Draw
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/ui/lasso-shapes/LatLonViewIntersectUtils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict"

import * as LatLonUtils from "../../../utils/utils-latlon"
import * as Draw from "@heavyai/draw/dist/mapd-draw"
import * as Draw from "@heavyai/draw/dist/draw"

const { AABox2d, Mat2d, Point2d, Vec2d } = Draw
const MathExt = Draw.Math
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/ui/lasso-tool-ui.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict"

import * as LatLonUtils from "../../utils/utils-latlon"
import * as Draw from "@heavyai/draw/dist/mapd-draw"
import * as Draw from "@heavyai/draw/dist/draw"
import simplify from "simplify-js"
import { logger } from "../../utils/logger"
import LatLonCircle from "./lasso-shapes/LatLonCircle"
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils-latlon.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict"

import * as Draw from "@heavyai/draw/dist/mapd-draw"
import * as Draw from "@heavyai/draw/dist/draw"

/**
* Calculates the distance in meters between two lon/lat coordinates
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils-vega.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import d3 from "d3"
import wellknown from "wellknown"
import { AABox2d, Point2d, PolyLine } from "@heavyai/draw/dist/mapd-draw"
import { AABox2d, Point2d, PolyLine } from "@heavyai/draw/dist/draw"
export function notNull(value) {
return value != null /* double-equals also catches undefined */
}
Expand Down

0 comments on commit 4b68670

Please sign in to comment.