mirror of
https://github.com/barthuijgen/factorio-sites.git
synced 2025-02-03 14:01:50 +02:00
Forked react-map-interaction to change zoom scale
This commit is contained in:
parent
c5e59f72f7
commit
d277adb856
13
.yalc/react-map-interaction/.yalcignore
Normal file
13
.yalc/react-map-interaction/.yalcignore
Normal file
@ -0,0 +1,13 @@
|
||||
/.storybook
|
||||
/example
|
||||
/src
|
||||
/stories
|
||||
.babelrc
|
||||
.gitignore
|
||||
.mocharc.json
|
||||
.nvmrc
|
||||
*.md
|
||||
*.sh
|
||||
example.gif
|
||||
mochaTestSetup.js
|
||||
webpack.config.js
|
1037
.yalc/react-map-interaction/dist/react-map-interaction.js
vendored
Normal file
1037
.yalc/react-map-interaction/dist/react-map-interaction.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
36
.yalc/react-map-interaction/package.json
Normal file
36
.yalc/react-map-interaction/package.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "react-map-interaction",
|
||||
"version": "2.0.0+760fcdb2",
|
||||
"description": "'Add map like zooming and dragging to any element'",
|
||||
"main": "dist/react-map-interaction.js",
|
||||
"scripts": {
|
||||
"test": "./node_modules/mocha/bin/mocha",
|
||||
"test:watch": "./node_modules/mocha/bin/mocha --watch",
|
||||
"test:cover": "nyc ./node_modules/mocha/bin/mocha",
|
||||
"dist": "webpack --config webpack.config.js --mode production",
|
||||
"dist:dev": "npm run dist && ./copy-to-example.sh",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"build-storybook": "build-storybook"
|
||||
},
|
||||
"keywords": [
|
||||
"react",
|
||||
"zoom",
|
||||
"pan",
|
||||
"pinch",
|
||||
"data visualization",
|
||||
"map"
|
||||
],
|
||||
"author": "Transcriptic",
|
||||
"private": false,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"react": "^16.3.0",
|
||||
"prop-types": "^15.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/transcriptic/react-map-interaction"
|
||||
},
|
||||
"dependencies": {},
|
||||
"yalcSig": "760fcdb2b8c4ce14979304df32411d35"
|
||||
}
|
1
.yalc/react-map-interaction/yalc.sig
Normal file
1
.yalc/react-map-interaction/yalc.sig
Normal file
@ -0,0 +1 @@
|
||||
760fcdb2b8c4ce14979304df32411d35
|
@ -1,4 +1,4 @@
|
||||
import React, { useState } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { css } from "@emotion/react";
|
||||
import { MapInteractionCSS } from "react-map-interaction";
|
||||
import { Image } from "@chakra-ui/image";
|
||||
@ -51,6 +51,13 @@ export const FullscreenImage: React.FC<FullscreenImageProps> = ({ alt, src }) =>
|
||||
translation: { x: window.innerWidth * 0.05, y: 30 },
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
setState({
|
||||
scale: 0.9,
|
||||
translation: { x: window.innerWidth * 0.05, y: 30 },
|
||||
});
|
||||
}, [src]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<StyledImage>
|
||||
|
@ -57,7 +57,7 @@
|
||||
"react-cookie": "4.0.3",
|
||||
"react-dom": "17.0.1",
|
||||
"react-icons": "4.2.0",
|
||||
"react-map-interaction": "2.0.0",
|
||||
"react-map-interaction": "file:.yalc/react-map-interaction",
|
||||
"react-markdown": "5.0.3",
|
||||
"react-multi-select-component": "3.1.6",
|
||||
"sharp": "0.27.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user