Commit 50a5bb9c authored by chris's avatar chris Committed by Yannis Barlas

expand annotation

parent 7b16ac65
......@@ -67,9 +67,8 @@ class WaxAnnotationCommand extends AnnotationCommand {
return false
}
executeMultipleCreateTransformations (params) {
executeMultipleCreateTransformations (params, annoData) {
const editorSession = this._getEditorSession(params)
const annoData = this.getAnnotationData()
const selection = editorSession.getSelection()
const propertySelections = selection.splitIntoPropertySelections()
......@@ -109,7 +108,7 @@ class WaxAnnotationCommand extends AnnotationCommand {
const isContainerSelection = selection.isContainerSelection()
if (isContainerSelection) {
this.executeMultipleCreateTransformations(params)
this.executeMultipleCreateTransformations(params, annoData)
return
}
......@@ -175,8 +174,10 @@ class WaxAnnotationCommand extends AnnotationCommand {
const annotation = documentHelpers.getPropertyAnnotationsForSelection(
doc, property, { type: this.getAnnotationType() })
if (this.canExpand(annotation, property)) {
} console.log('allAnnos', annotation)
this._applyTransform(params, function (tx) {
annotationHelpers.expandAnnotation(tx, annotation[0], property)
})
}
})
}
......@@ -194,7 +195,6 @@ class WaxAnnotationCommand extends AnnotationCommand {
const anno = annos[0]
this._checkPrecondition(params, annos, this.canExpand)
this._applyTransform(params, function(tx) {
console.log('sub', tx, anno, params.selection)
annotationHelpers.expandAnnotation(tx, anno, params.selection)
})
return {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment