I use go.js as npm module, via Webpack. I would like to try RealtimeDragSelectingTool ( https://github.com/NorthwoodsSoftware/GoJS/blob/master/extensions/RealtimeDragSelectingTool.js ) but the way of use in the provided documentation doesn't work. I import it like this:
import RealtimeDragSelectingTool from 'gojs/extensions/RealtimeDragSelectingTool'
If I use go.GraphObject.make(RealtimeDragSelectingTool)
, it raises the following error:
GraphObject.make requires a class function or GoJS class name or name of an object builder, not: [object Object]"
What am I doing wrong?
import { RealtimeDragSelectingTool } from './gojs/extensionsTS/RealtimeDragSelectingTool';
extensionsTS
目录中的现有JS文件采用UMD模块格式。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.