Math

Answered

I want use native dragAndDrop Session

i see the dragAndDrop function by NativeFunctions , I guess this function maybe drag something, so what do i need to get these functions


Best Answer

Dear Heyb6,

the "drag and drop" function is currently available via our "SELECTOR" pointer tool: https://developer.myscript.com/docs/interactive-ink/latest/android/fundamentals/tool-controller/#pointer-tool

The easier is that you refer to our latest "Demo" sample, available on our github: https://github.com/MyScript/interactive-ink-examples-android/tree/master/Demo

You can refer in particular to the PartEditor.kt file:
When selecting the "Lasso", we set the PointerTool to SELECTOR:

private fun ToolType.toPointerTool(): PointerTool = when (this) {
ToolType.HAND -> PointerTool.HAND
ToolType.PEN -> PointerTool.PEN
ToolType.HIGHLIGHTER -> PointerTool.HIGHLIGHTER
ToolType.LASSO -> PointerTool.SELECTOR
ToolType.ERASER -> PointerTool.ERASER
}

As said in another post, for the moment, the lasso selection is limited to “Diagram”, “Raw Content” and “Text Document” parts.

Best regards,

Olivier

1 Comment

Answer

Dear Heyb6,

the "drag and drop" function is currently available via our "SELECTOR" pointer tool: https://developer.myscript.com/docs/interactive-ink/latest/android/fundamentals/tool-controller/#pointer-tool

The easier is that you refer to our latest "Demo" sample, available on our github: https://github.com/MyScript/interactive-ink-examples-android/tree/master/Demo

You can refer in particular to the PartEditor.kt file:
When selecting the "Lasso", we set the PointerTool to SELECTOR:

private fun ToolType.toPointerTool(): PointerTool = when (this) {
ToolType.HAND -> PointerTool.HAND
ToolType.PEN -> PointerTool.PEN
ToolType.HIGHLIGHTER -> PointerTool.HIGHLIGHTER
ToolType.LASSO -> PointerTool.SELECTOR
ToolType.ERASER -> PointerTool.ERASER
}

As said in another post, for the moment, the lasso selection is limited to “Diagram”, “Raw Content” and “Text Document” parts.

Best regards,

Olivier