Skip to content

Commit

Permalink
externalWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
kd committed Nov 3, 2024
1 parent 3d9ced4 commit 3072afe
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions viewer/components/ExternalWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@ const transform=(self,node,index)=>{
};

export const ExternalWidget =(props)=>{
/*
constructor(props){
super(props);
let self=this;
this.state={updateCount:1};
this.canvasRef=this.canvasRef.bind(this);
this.renderCanvas=this.renderCanvas.bind(this);
GuiHelper.nameKeyEventHandler(this,"widget");
this.userData={
eventHandler:[],
triggerRedraw: ()=>{self.setState({updateCount:self.state.updateCount+1})}
};
if (typeof(this.props.initFunction) === 'function'){
this.props.initFunction.call(this.userData,this.userData,this.props);
}
}
*/

const {updateCount,setUpdateCount}=useState(1);
const initialCalled=useRef(false);
const canvasRef=useRef(null);
Expand Down

0 comments on commit 3072afe

Please sign in to comment.