fix(canvas): drop an image onto an empty placeholder fills it again
A jian bump made unpainted container bodies opt out of the click hit-test, which also excluded empty placeholder boxes from image-drop resolution — a drop over one inserted a fresh node instead of filling it. Resolve the drop target through the new fill hit-test variant that keeps empty bodies in the path, and bump the jian pin to carry it.
This commit is contained in:
parent
5821a439ce
commit
d5b0088cfb
|
|
@ -58,9 +58,12 @@ impl WidgetHostNative {
|
|||
.editor_state
|
||||
.viewport
|
||||
.to_document(Point2D::new(x - cx0, y - cy0));
|
||||
// The fill variant so an empty placeholder box — which paints nothing
|
||||
// and therefore opts out of the click hit-test — is still offered as a
|
||||
// drop target instead of the image landing as a fresh sibling node.
|
||||
let path = self
|
||||
.layout_scene
|
||||
.node_path_at_doc_point(doc_point, self.editor_state.viewport.zoom)?;
|
||||
.node_path_at_doc_point_for_fill(doc_point, self.editor_state.viewport.zoom)?;
|
||||
self.editor_state.resolve_image_drop_target(&path)
|
||||
}
|
||||
|
||||
|
|
|
|||
2
vendor/jian
vendored
2
vendor/jian
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 18691c42169f59374d58d13065fc606fa6c39c24
|
||||
Subproject commit 2edfc361cff3f6f33174746c048002607d691d1c
|
||||
Loading…
Reference in a new issue