You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug:
It would appear that the props hideNext, hidePrev, etc only works for the "ImageSegmentation" component. This PR addressed adding the option to add these props within UniversalSampleEditor: #410
However, the references to the props need to be added for each component in order for it to work, as UniversalSampleEditor renders each component separately based on its interface. If the component is rendered without a reference to these props, the props are labeled as undefined!
Steps to Reproduce?
I am trying to use the UniversalSampleEditor to render a VideoSegmentation object. I have no need for the Next/Prev buttons at this time, so I tried passing in the hidePrev & hideNext props to the object, but I found that this doesn't hide the buttons:
return(
<UniversalSampleEditor
hideNext
interface={{
type: 'video_segmentation',
regionTypesAllowed: ['bounding-box', 'polygon', 'full-segmentation', 'point', 'pixel-mask'],
multipleRegionLabels: true,
multipleRegions: true,
overlappingRegions: true
}}
sample={{ videoUrl: url}}
onExit={(action) => {
// Called when user hits "Save", "Next", or "Prev"
}}
// when data is saved this is called
onModifySample={(sampleIndex, newSampleData) => {
console.log('data: ', sampleIndex)
}}
/>
)
}
The bug:
It would appear that the props hideNext, hidePrev, etc only works for the "ImageSegmentation" component. This PR addressed adding the option to add these props within UniversalSampleEditor: #410
However, the references to the props need to be added for each component in order for it to work, as UniversalSampleEditor renders each component separately based on its interface. If the component is rendered without a reference to these props, the props are labeled as undefined!
Steps to Reproduce?
I am trying to use the UniversalSampleEditor to render a VideoSegmentation object. I have no need for the Next/Prev buttons at this time, so I tried passing in the hidePrev & hideNext props to the object, but I found that this doesn't hide the buttons:
Even though hideNext is registered here, it won't matter because VideoSegmentation doesn't pass this prop through to the "Annotator" object within VideoSegmentation.js: https://github.com/UniversalDataTool/universal-data-tool/blob/master/src/components/VideoSegmentation/index.js
We can verify this by looking at the React devtools:
MainLayout, a child of Annotator, has a value of "undefined" for these props!
This is important, as manually changing these fields within the devtools creates the desired effect.
The text was updated successfully, but these errors were encountered: