File tree Expand file tree Collapse file tree 5 files changed +21
-3
lines changed
Expand file tree Collapse file tree 5 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @thatopen/components" ,
33 "description" : " Collection of core functionalities to author BIM apps." ,
4- "version" : " 2.1.0 " ,
4+ "version" : " 2.1.1 " ,
55 "author" : " That Open Company" ,
66 "contributors" : [
77 " Antonio Gonzalez Viegas (https://github.com/agviegas)" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export class Components implements Disposable {
1414 /**
1515 * The version of the @thatopen/components library.
1616 */
17- static readonly release = "2.0.26 " ;
17+ static readonly release = "2.1.1 " ;
1818
1919 /** {@link Disposable.onDisposed } */
2020 readonly onDisposed = new Event < void > ( ) ;
Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ export class VertexPicker extends Component implements Disposable {
4949 */
5050 readonly onVertexLost = new Event < THREE . Vector3 > ( ) ;
5151
52+ /**
53+ * An event that is triggered when the picker is enabled or disabled
54+ */
55+ readonly onEnabled = new Event < boolean > ( ) ;
56+
5257 /**
5358 * A reference to the Components instance associated with this VertexPicker.
5459 */
@@ -79,6 +84,7 @@ export class VertexPicker extends Component implements Disposable {
7984 if ( ! value ) {
8085 this . _pickedPoint = null ;
8186 }
87+ this . onEnabled . trigger ( value ) ;
8288 }
8389
8490 /**
Original file line number Diff line number Diff line change 11{
22 "name" : " @thatopen/components-front" ,
33 "description" : " Collection of frontend tools to author BIM apps." ,
4- "version" : " 2.1.0 " ,
4+ "version" : " 2.1.1 " ,
55 "author" : " That Open Company" ,
66 "contributors" : [
77 " Antonio Gonzalez Viegas (https://github.com/agviegas)" ,
Original file line number Diff line number Diff line change @@ -17,6 +17,18 @@ export class GraphicVertexPicker
1717 /** The marker used to indicate the picked vertex. */
1818 marker : Mark | null = null ;
1919
20+ constructor (
21+ components : OBC . Components ,
22+ config ?: Partial < OBC . VertexPickerConfig > ,
23+ ) {
24+ super ( components , config ) ;
25+ this . onEnabled . add ( ( value : boolean ) => {
26+ if ( this . marker ) {
27+ this . marker . visible = value ;
28+ }
29+ } ) ;
30+ }
31+
2032 /** {@link OBC.Disposable.onDisposed } */
2133 dispose ( ) {
2234 if ( this . marker ) {
You can’t perform that action at this time.
0 commit comments