Skip to content

Commit

Permalink
helper
Browse files Browse the repository at this point in the history
  • Loading branch information
GiordanoT committed Nov 5, 2023
1 parent 9ffc021 commit d33bb95
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/components/helper/Helper.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import './style.scss'
import React from "react";
import React, {useEffect, useRef} from "react";
import {useStateIfMounted} from "use-state-if-mounted";

interface Props {}
function Helper(props: Props) {
const [flag, setFlag] = useStateIfMounted(false);
const [iconFlag, setIconFlag] = useStateIfMounted(false);
const [menuFlag, setMenuFlag] = useStateIfMounted(false);

return(<section className={'helper'} >
{flag && <div className={'helper-menu border'}>
return(<section className={'helper'} tabIndex={-1}>
{(iconFlag || menuFlag) && <div className={'helper-menu border'}
onMouseEnter={e => setMenuFlag(true)} onMouseLeave={e => setMenuFlag(false)}>
<div tabIndex={-1} onClick={e => alert('ok1')} className={'helper-item'}>Test 1</div>
<div tabIndex={-1} onClick={e => alert('ok2')} className={'helper-item'}>Test 2</div>
<hr />
<div tabIndex={-1} onClick={e => setFlag(false)} className={'text-danger helper-item'}>Close</div>
<div tabIndex={-1} onClick={e => console.log('ok2')} className={'helper-item'}>Test 2</div>
</div>}
<div tabIndex={-1} onClick={e => setFlag(!flag)}
className={'helper-icon bg-dark circle border d-flex justify-content-center align-items-center'}>
<div tabIndex={-1} onClick={e => setIconFlag(!iconFlag)} onBlur={e => setIconFlag(false)}
className={'bg-dark helper-icon circle border d-flex justify-content-center align-items-center'}>
<label style={{cursor: 'pointer'}} className={'text-white'}>?</label>
</div>
</section>)
</section>);
}

export default Helper;
1 change: 1 addition & 0 deletions src/components/helper/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@
position: absolute;
bottom: 0; right: 0;
}

1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Router from "./router/Router";


function start() {
// first do login and then ...
jodelInit();
ReactDOM.render(
<Provider store={store}>
Expand Down
3 changes: 2 additions & 1 deletion src/joiner/classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ export class PendingPointedByPaths{
}

@RuntimeAccessible
export class PointedBy{
export class PointedBy {
public static cname: string = "PointedBy";
static list: string[] = ["father", "parent", "annotations", "packages", "type", "subpackages", "classifiers", "exceptions", "parameters", "defaultValue", "instances", "operations", "features", "attributes", "references", "extends", "extendedBy", "implements", "implementedBy", "instanceof", "edges", "target", "opposite", "parameters", "exceptions", "literals", "values"];
source: string; // elemento da cui parte il puntatore
Expand Down Expand Up @@ -1680,6 +1680,7 @@ export class DProject extends DPointerTargetable {
models: Pointer<DModel, 0, 'N'> = [];
graphs: Pointer<DGraph, 0, 'N'> = [];
views: Pointer<DViewElement, 0, 'N'> = U.getDefaultViewsID();
// collaborators dict user: priority

public static new(name: string, author: Pointer<DUser, 1, 1, LUser>, persist: boolean = true): DProject {
return new Constructors(new DProject('dwc'), undefined, persist, undefined)
Expand Down

0 comments on commit d33bb95

Please sign in to comment.