Giter Club home page Giter Club logo

d3-tree-visualization's People

Contributors

greatsumini avatar

Stargazers

 avatar

Watchers

 avatar  avatar

d3-tree-visualization's Issues

Svg 관련 로직 분리하기

사실 helper로 구현할지 좀 고민이다.. helper와 client의 차이를 명확히 두는게 어려운 포인트인 것 같다.
지금생각: client는 외부 dependency에 대한 provider 느낌! 어떤 개념에 대한 추상화된 인터페이스를 제공한다. 반면에 helper는 하나의 feature다.
Svg는 toObjectUrl, getViewBox, export 등 class로 만들었을 때 재미볼만한 부분이 좀 있는 것 같은데 client라는 네이밍이 너무 거슬린다.. manager라는 building block을 추가해야하나 싶기도하다.

  • dom.helper.ts: createSvgObjectUrl(svgEle: SVGSVGElement): string
  • dom.helper.ts: downloadObjectUrl(objectUrl: string): void

21-08-03 12:21 수정
한 helper.ts 파일에 하나의 helper 함수만 존재하도록 리팩토링 하는 것도 좋을 것 같다. 연관된 helper들의 묶음을 표현하고 싶은 경우 디렉토리를 사용한다. 변경 후 예상 구조는 다음과 같다.

src/helpers
  - download-object.url.helper.ts
  - clean-file-data.helper.ts
  - is-freq-node.helper.ts
  - svg
    - create-svg-object-url.helper.ts
    - get-svg-view-box.helper.ts

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.