Giter VIP home page Giter VIP logo

engineeringeditor's Introduction

Build Status

Modal Dialog

appEventDispatcher.dispatch("showModal", <ModalId>)

if modalId === "" then the keyboard-handler will be active

PaperJS

fix to version - to not get in trouble:

"@types/paper": "0.11.9",
"paper": "0.12.0",

EngineeringEditor

Paper hitTest

there are some items with name "temp" (bounding box, item for drawMode: 'select', 'hover', 'edit'). they should not be be found by PaperJs hitTest(). So there is a 'match' function on the hitTest call. and the drawMode items are created with item.name = "temp"

started on CodeSandbox

Layout inspired by CodeSandbox ;-) / Whimsical

backend for the first days

https://github.com/typicode/json-server

##svg icons http://svgicons.sparkk.fr/ http://www.zondicons.com/icons.html http://www.steveschoger.com/2018/01/04/introducing-heroicons-ui/

show svg as react-component

https://facebook.github.io/create-react-app/docs/adding-images-fonts-and-files

javascript hints

https://itnext.io/advanced-react-redux-techniques-how-to-use-refs-on-connected-components-e27b55c06e34

check if property exists

  if ( "myprop" in obj) {
        //  obj.myprop  exists
  }

react ref on connected components

DefinitelyTyped/DefinitelyTyped#26871

ref = { comp => this.myCompRef = (comp as any).getWrappedInstance() }

redux-saga

call

when using call, the arguments has to be separated

const result = yield call(getPointSaga, actionTypes.MOUSE_DOWN);

const result = yield getPointSaga(actionTypes.MOUSE_DOWN);

hints

environment in react

use .env (dotenv), start environment varialbe with REACT_APP_

https://medium.com/@tacomanator/environments-with-create-react-app-7b645312c09d

deploy with travis / azure

http://sviridovserg.com/2017/05/16/cd-with-travis-and-azure/

typescript

https://github.com/Microsoft/TypeScript-React-Starter#typescript-react-starter

toJSON / fromJSON

http://choly.ca/post/typescript-json/

coding rules

UPDATE*... Actions => payload is the new object that will exchange the old object with the same .id. So before dispatch(UPDATE*...Action ) a new object has to be created by deepClone(currentObject)

other stuff

keyboard commands of whimsical.co https://help.whimsical.co/faqs/keyboard-shortcuts

Jest & PaperJs

yarn add -D jest-canvas-mock

in the jest setup file:

import "jest-canvas-mock"

install

create ''.env'' file:

REACT_APP_GRAPHQL_SERVER=http://localhost:8080

engineeringeditor's People

Contributors

renecode avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.