Comment out secrets from deploy, interpolate for rotated pic
This commit is contained in:
@@ -5,16 +5,16 @@ cd web
|
|||||||
npm run build
|
npm run build
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Check and set secrets
|
# Check and set secrets (needed only when secrets change
|
||||||
if [ -s .env-fly ]; then
|
#if [ -s .env-fly ]; then
|
||||||
while read line; do
|
# while read line; do
|
||||||
echo "Setting secrets: $line"
|
# echo "Setting secrets: $line"
|
||||||
fly secrets set "$line"
|
# fly secrets set "$line"
|
||||||
done < .env-fly
|
# done < .env-fly
|
||||||
else
|
#else
|
||||||
echo ".env-fly file is missing or empty, skipping setting secrets"
|
# echo ".env-fly file is missing or empty, skipping setting secrets"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
# Test, build and deply
|
# Test, build and deply
|
||||||
if sbt test; then
|
if sbt test; then
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { isCalculatedWindDirection, windDirectionArrows, windDirectionColors, wi
|
|||||||
|
|
||||||
import latvia_border from '../../assets/latvia_contour.webp'
|
import latvia_border from '../../assets/latvia_contour.webp'
|
||||||
const latviaBoderImg = new Image()
|
const latviaBoderImg = new Image()
|
||||||
latviaBoderImg.onload = () => console.log('latvia_contour loaded')
|
latviaBoderImg.onload = () => console.log('latvia_contour loaded...')
|
||||||
latviaBoderImg.src = latvia_border
|
latviaBoderImg.src = latvia_border
|
||||||
|
|
||||||
export type CropBounds = { x: number, y: number, width: number, height: number }
|
export type CropBounds = { x: number, y: number, width: number, height: number }
|
||||||
@@ -70,7 +70,7 @@ export function drawGrib(
|
|||||||
ctx.restore()
|
ctx.restore()
|
||||||
|
|
||||||
if (cropBounds) {
|
if (cropBounds) {
|
||||||
drawRotate(canvas, ctx)
|
drawRotate(canvas, ctx, isInterpolated)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isContour && cropBounds) {
|
if (isContour && cropBounds) {
|
||||||
@@ -161,8 +161,8 @@ function fillImageData(
|
|||||||
function drawRotate(
|
function drawRotate(
|
||||||
canvas: HTMLCanvasElement,
|
canvas: HTMLCanvasElement,
|
||||||
ctx: CanvasRenderingContext2D,
|
ctx: CanvasRenderingContext2D,
|
||||||
|
isInterpolated = false,
|
||||||
angleDegrees = 26,
|
angleDegrees = 26,
|
||||||
// angleDegrees = 0,
|
|
||||||
) {
|
) {
|
||||||
const tempCanvas = document.createElement('canvas')
|
const tempCanvas = document.createElement('canvas')
|
||||||
tempCanvas.width = canvas.width
|
tempCanvas.width = canvas.width
|
||||||
@@ -179,6 +179,13 @@ function drawRotate(
|
|||||||
// canvas.height = 165
|
// canvas.height = 165
|
||||||
canvas.width = 1365
|
canvas.width = 1365
|
||||||
canvas.height = 576
|
canvas.height = 576
|
||||||
|
// console.log(ctx.imageSmoothingEnabled, ctx.imageSmoothingQuality)
|
||||||
|
if (isInterpolated) {
|
||||||
|
ctx.imageSmoothingEnabled = true
|
||||||
|
ctx.imageSmoothingQuality = 'high' // Options: 'low', 'medium', 'high'
|
||||||
|
} else {
|
||||||
|
ctx.imageSmoothingEnabled = false
|
||||||
|
}
|
||||||
ctx.save()
|
ctx.save()
|
||||||
ctx.translate(canvas.width/2, canvas.height/2)
|
ctx.translate(canvas.width/2, canvas.height/2)
|
||||||
ctx.scale(3.5, 3.5)
|
ctx.scale(3.5, 3.5)
|
||||||
|
|||||||
Reference in New Issue
Block a user