Skip to content
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(core): return a processed spec when a new spec is compiled #1002

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

sehilyi
Copy link
Member

@sehilyi sehilyi commented Nov 30, 2023

Fix #
Toward #

Change List

  • This PR adds an internal object as the third parameter of compile callback function:
<GoslingComponent spec={spec} compiled={(newSpec, newHg, _internalData) => {
   const { _processedSpec } =  _internalData;
}/> 

publish('specProcessed', {
id: specCopy.id,
spec: specCopy
});
// Make HiGlass models for individual tracks
createHiGlassModels(specCopy, trackInfos, callback, theme, urlToFetchOptions);

The _processedSpec is the same as the specCopy object above, which is the processed spec.

Checklist

  • Ensure the PR works with all demos on the online editor
  • Unit tests added or updated
  • Examples added or updated
  • Documentation updated (e.g., added API functions)
  • Screenshots for visual changes (e.g., new encoding support or UI change on Editor)

@sehilyi sehilyi merged commit 59aed49 into master Nov 30, 2023
5 checks passed
@sehilyi sehilyi deleted the sehilyi/return-processed-spec branch November 30, 2023 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant