wallabyway / area-markup

area-measure tool for Forge Viewer. Demo of space planning application (area-markup synced to mySQL)
https://wallabyway.github.io/area-markup/
MIT License
13 stars 7 forks source link

SnapResult cannot be constructed in v6 #3

Open Universezero opened 6 years ago

Universezero commented 6 years ago

In the Forge Viewer v6, the tool cannot recreate previously saved measurements, due to SnapResult either no longer having a constructor, or the constructor being moved:

var p = _currentMeasurement.setPick(json.id, new Autodesk.Viewing.Extensions.Measure.SnapResult()) Uncaught TypeError: Autodesk.Viewing.Extensions.Measure.SnapResult is not a constructor

andreperegrinah commented 5 years ago

This works for me: instead of new Autodesk.Viewing.Extensions.Measure.SnapResult() you can use _currentMeasurement.getPick(1).clone()