New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: map chart structure #671
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아직 다행히 큰 변화는 없는 것 같아요~ 잘 묻어났네요
수고하셨습니다.
|
||
return mapCoordinate && geoContains(model.feature, mapCoordinate); | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굳
import { setSize } from '@src/helpers/painter'; | ||
import { GeoFeatureModel } from '@t/components/geoFeature'; | ||
|
||
export function geoFeature(ctx: CanvasRenderingContext2D, gp: GeoPath, model: GeoFeatureModel) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feature 뭔가 어색한 늬낌인데. 걍 geo하면 어때요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
geoJSON에서 제공하는 feature collection을 가지고 그리는 브러시라 컴포넌트랑 같이 getFeature라는 이름으로 통일 시켰는데요.
개인적으로는 feature라는 단어가 들어가야 명확할 것 같은데 혹시 다른 분들 의견은 어떠신가요?
import Component from './component'; | ||
import { GeoFeatureModel, GeoFeatureResponderModel } from '@t/components/geoFeature'; | ||
|
||
export default class GeoFeature extends Component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GeoFeature 네이밍이 어색합니다.
GeoMap, GeoPart, GeoCountry, GeoZone?
GeoWord? 대륙마다 컴포넌트가 생성되나요? (Continents)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,154 @@ | |||
import { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
store도 shared에서 가져와서 사용할 수 있을 것같은데, 다른점이 있나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Store 모듈이나 옵션 자체 타입이 많이 달라져서 일단을 이렇게 구현했는데요.
이후에 얼마나 달라질지 몰라서 어느정도 윤곽이 잡히면 다시 나눌 예정이라 그떄 정리 다시 할게요!
const el = createContainer(); | ||
const chart = new MapChart({ | ||
el, | ||
options: { chart: { width: 500, height: 500, type: 'world' } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 MapChart하나로 type값만 줘서 그리는 군요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분은 아마 변경될 수 있을 것 같은데 사실상 차트의 종류가 변경되는 느낌이 아니라서 타입으로 했어요 ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰완료했습니다. 수고하셨어요~!
proc(...args); | ||
}); | ||
|
||
proc = debounce(proc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 나누어서 하는 이유가 있나요?
} | ||
|
||
remove(ComponentCtor: ComponentConstructor) { | ||
this.components = this.components.filter((component) => !(component instanceof ComponentCtor)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
store에서는 따로 해제하지 않아도 되나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 별도로 관리되고 있습니다
render(chartState) { | ||
const { series, theme, layout } = chartState; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state를 추상 클래스에서 주입해서 매번 넘겨줘야 하나요? store에서 꺼내오거나, 추상클래스에서 state자체를 인스턴스 변수로 주입시켜도 되지 않을까해서요. 같은 류의 데이터인대 state만 메서드로 주입하는 이유가 궁금하네요ㅎㅎ
apps/shared/src/store/reactive.ts
Outdated
if (observerCallCue.includes(observer)) { | ||
observerCallCue.splice(observerCallCue.indexOf(observer), 1); | ||
} | ||
// We use observer call cue because avoid nested observer call. | ||
observerCallCue.push(observer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
배치를 이렇게 처리하는군요ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 완료입니다!
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)Description
storybook
click
Thank you for your contribution to TOAST UI product. 🎉 😘 ✨