Commit a7ffd97c authored by LasseKau's avatar LasseKau
Browse files

-

-
parent 6ff42edd
......@@ -13775,6 +13775,11 @@
"is-typedarray": "^1.0.0"
}
},
"typescript": {
"version": "4.3.0-dev.20210410",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.0-dev.20210410.tgz",
"integrity": "sha512-I0SyjlLiGKXyX9+YvzPhHhNT5zmDUNW/pGaE1tz3RvZxbk6GGlHMxJoPhR5K8TdiEeMZkDtw4cT4K8rbtfEFpA=="
},
"unbox-primitive": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
......
......@@ -14,6 +14,7 @@
"react-spring": "^9.1.0",
"react-use-gesture": "^9.1.3",
"sass": "^1.32.8",
"typescript": "^4.3.0-dev.20210410",
"web-vitals": "^1.0.1"
},
"scripts": {
......
......@@ -13,6 +13,8 @@
cursor: grab;
}
.information {
display: flex;
flex-direction: column;
......@@ -21,19 +23,25 @@
align-items: center;
display: -webkit-box;
display: -ms-flexbox;
display: block;
margin-right: auto;
margin-left: auto;
}
input {
width: 240px;
height: 30px;
font-size: 15px;
padding-left: 10px;
margin: 5px;
width: 160px;
height: 20px;
font-size: 12px;
padding-left: 6px;
margin: 6px;
}
button {
display: block;
margin-right: auto;
margin-left: auto;
width: 320px;
height: 50px;
margin-top: 15px;
......
import React, { useState, useEffect } from 'react'
import './App.css';
import { useSpring, animated } from "react-spring";
import { useDrag } from "react-use-gesture";
function dragOnClick(props) {
console.log("animated div");
<animated.div
{...bind()}
style={{ x, y }}
styles="width:20px;height:20px;background-color:red"
>
<div className="content" id="j1_64_anchor">
<button onClick="int()" class="collapsible">Interfaces</button>
</div>
</animated.div>
};
function DragButton(props) {
const [{ x, y }, set] = useSpring(() => ({ x: 0, y: 0 }));
console.log("pulling");
dragOnClick();
const bind = useDrag(({ down, movement: [mx, my] }) => {
//console.log(down);
set({ x: down ? mx : 0, y: down ? my : 0 });
console.log("release");
})
};
import React, { useState, useEffect } from 'react'
import './App.css';
import Axios from 'axios';
import { useSpring, animated } from "react-spring";
import { useDrag } from "react-use-gesture";
\ No newline at end of file
// import React from "react";
// const Nav = () => (
// <nav>
// <h1>Logo</h1>
// <ul>
// <li>Home</li>
// <li>Home</li>
// <li>Home</li>
// <li>Home</li>
// </ul>
// </nav>
// );
// export default Nav;
\ No newline at end of file
import React, { useState, useEffect } from 'react'
import { useSpring, animated } from "react-spring";
import { useDrag } from "react-use-gesture";
//import { App } from 'St;
//fix asap
function dragOnClick(props) {
console.log("animated div");
<animated.div
{...bind()}
style={{ x, y }}
styles="width:20px;height:20px;background-color:red"
>
<div className="content" id="j1_64_anchor">
<button onClick="int()" class="collapsible">Interfaces</button>
</div>
</animated.div>
}
function clickListener(props) {
document.addEventListener('DOMContentLoaded', function () {
document.querySelector('button').addEventListener('click', int)
});
console.log("click");
};
function DragButton(props) {
const [{ x, y }, set] = useSpring(() => ({ x: 0, y: 0 }));
console.log("pulling");
dragOnClick();
const bind = useDrag(({ down, movement: [mx, my] }) => {
//console.log(down);
set({ x: down ? mx : 0, y: down ? my : 0 });
console.log("release");
})
};
function int(props) {
console.log('calling');
var source = document.getElementById('j1_64_anchor').click();
///////////////
var coll = document.getElementsByClassName("collapsible");
var i;
DragButton();
}
// function collapsible(props) {
// console.log("collapsible");
// var coll = document.getElementsByClassName("collapsible");
// var i;}
export { clickListener, DragButton, int, dragOnClick }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment