diff options
author | bob <bcz@cs.brown.edu> | 2019-10-15 16:25:10 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-10-15 16:25:10 -0400 |
commit | 33811c112c7e479813908ba10f72813954a3e289 (patch) | |
tree | 8e424501ea479d03423660c3251a1afce8c060c0 /src/client/views/CollectionLinearView.tsx | |
parent | 03f86e3b7b450699073c47aa43af23d31e0765d4 (diff) |
working version of inking buttons
Diffstat (limited to 'src/client/views/CollectionLinearView.tsx')
-rw-r--r-- | src/client/views/CollectionLinearView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/CollectionLinearView.tsx b/src/client/views/CollectionLinearView.tsx index 9d1dd7749..eb3c768d0 100644 --- a/src/client/views/CollectionLinearView.tsx +++ b/src/client/views/CollectionLinearView.tsx @@ -48,7 +48,7 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) { drop = action((e: Event, de: DragManager.DropEvent) => { (de.data as DragManager.DocumentDragData).draggedDocuments.map((doc, i) => { let dbox = doc; - if (!doc.onDragStart && this.props.Document.convertToButtons && doc.viewType !== CollectionViewType.Linear) { + if (!doc.onDragStart && !doc.onClick && this.props.Document.convertToButtons && doc.viewType !== CollectionViewType.Linear) { dbox = Docs.Create.FontIconDocument({ nativeWidth: 100, nativeHeight: 100, width: 100, height: 100, backgroundColor: StrCast(doc.backgroundColor), title: "Custom", icon: "bolt" }); dbox.dragFactory = doc; dbox.removeDropProperties = doc.removeDropProperties instanceof ObjectField ? ObjectField.MakeCopy(doc.removeDropProperties) : undefined; @@ -90,7 +90,7 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) { return <div className={`collectionLinearView-docBtn` + (pair.layout.onClick || pair.layout.onDragStart ? "-scalable" : "")} key={StrCast(pair.layout.title)} ref={dref} style={{ width: nested ? pair.layout[WidthSym]() : this.dimension(), - height: nested ? pair.layout[HeightSym]() : this.dimension(), + height: nested && pair.layout.isExpanded ? pair.layout[HeightSym]() : this.dimension(), transform: nested ? undefined : `translate(${deltaSize / 2}px, ${deltaSize / 2}px)` }} > <DocumentView |