aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/documents/DocumentTypes.ts1
-rw-r--r--src/client/documents/Documents.ts24
-rw-r--r--src/client/util/SearchUtil.ts4
-rw-r--r--src/client/views/globalCssVariables.scss2
-rw-r--r--src/client/views/search/SearchBox.tsx7
5 files changed, 26 insertions, 12 deletions
diff --git a/src/client/documents/DocumentTypes.ts b/src/client/documents/DocumentTypes.ts
index b98e4d581..b6a6cc75a 100644
--- a/src/client/documents/DocumentTypes.ts
+++ b/src/client/documents/DocumentTypes.ts
@@ -14,7 +14,6 @@ export enum DocumentType {
LINKDB = "linkdb",
BUTTON = "button",
SLIDER = "slider",
- EXTENSION = "extension",
YOUTUBE = "youtube",
WEBCAM = "webcam",
FONTICON = "fonticonbox",
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index cc85e5c6f..cca0e7bc6 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -580,11 +580,25 @@ export namespace Docs {
}
export function InkDocument(color: string, tool: number, strokeWidth: number, points: { X: number, Y: number }[], options: DocumentOptions = {}) {
- const doc = InstanceFromProto(Prototypes.get(DocumentType.INK), new InkField(points), options);
- doc.color = color;
- doc.strokeWidth = strokeWidth;
- doc.tool = tool;
- return doc;
+ const I = new Doc();
+ I.type = DocumentType.INK;
+ I.layout = InkingStroke.LayoutString("data");
+ I.color = color;
+ I.strokeWidth = strokeWidth;
+ I.tool = tool;
+ I.title = "ink";
+ I.x = options.x;
+ I.y = options.y;
+ I._width = options._width;
+ I._height = options._height;
+ I.data = new InkField(points);
+ return I;
+ // return I;
+ // const doc = InstanceFromProto(Prototypes.get(DocumentType.INK), new InkField(points), options);
+ // doc.color = color;
+ // doc.strokeWidth = strokeWidth;
+ // doc.tool = tool;
+ // return doc;
}
export function PdfDocument(url: string, options: DocumentOptions = {}) {
diff --git a/src/client/util/SearchUtil.ts b/src/client/util/SearchUtil.ts
index b597f1e07..2026bf940 100644
--- a/src/client/util/SearchUtil.ts
+++ b/src/client/util/SearchUtil.ts
@@ -64,7 +64,7 @@ export namespace SearchUtil {
const textDocs = newIds.map((id: string) => textDocMap[id]).map(doc => doc as Doc);
for (let i = 0; i < textDocs.length; i++) {
const testDoc = textDocs[i];
- if (testDoc instanceof Doc && testDoc.type !== DocumentType.KVP && testDoc.type !== DocumentType.EXTENSION && theDocs.findIndex(d => Doc.AreProtosEqual(d, testDoc)) === -1) {
+ if (testDoc instanceof Doc && testDoc.type !== DocumentType.KVP && theDocs.findIndex(d => Doc.AreProtosEqual(d, testDoc)) === -1) {
theDocs.push(Doc.GetProto(testDoc));
theLines.push(newLines[i].map(line => line.replace(query, query.toUpperCase())));
}
@@ -74,7 +74,7 @@ export namespace SearchUtil {
const docs = ids.map((id: string) => docMap[id]).map(doc => doc as Doc);
for (let i = 0; i < ids.length; i++) {
const testDoc = docs[i];
- if (testDoc instanceof Doc && testDoc.type !== DocumentType.KVP && testDoc.type !== DocumentType.EXTENSION && (options.allowAliases || theDocs.findIndex(d => Doc.AreProtosEqual(d, testDoc)) === -1)) {
+ if (testDoc instanceof Doc && testDoc.type !== DocumentType.KVP && (options.allowAliases || theDocs.findIndex(d => Doc.AreProtosEqual(d, testDoc)) === -1)) {
theDocs.push(testDoc);
theLines.push([]);
}
diff --git a/src/client/views/globalCssVariables.scss b/src/client/views/globalCssVariables.scss
index 019f931f9..9d3d2e592 100644
--- a/src/client/views/globalCssVariables.scss
+++ b/src/client/views/globalCssVariables.scss
@@ -21,7 +21,7 @@ serif;
// misc values
$border-radius: 0.3em;
//
-$search-thumnail-size: 175;
+$search-thumnail-size: 130;
// dragged items
$contextMenu-zindex: 100000; // context menu shows up over everything
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index f25d4ec7e..67af661c9 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -316,8 +316,9 @@ export class SearchBox extends React.Component<SearchProps> {
private get filterQuery() {
const types = this.filterTypes;
- const includeDeleted = this.getDataStatus();
- return "NOT baseProto_b:true" + (includeDeleted ? "" : " AND NOT deleted_b:true") + (types ? ` AND (${types.map(type => `({!join from=id to=proto_i}type_t:"${type}" AND NOT type_t:*) OR type_t:"${type}" OR type_t:"extension"`).join(" ")})` : "");
+ const includeDeleted = this.getDataStatus() ? "" : " AND NOT deleted_b:true";
+ const includeIcons = this.getDataStatus() ? "" : " AND NOT type_t:fonticonbox";
+ return "NOT baseProto_b:true" + includeDeleted + includeIcons + (types ? ` AND (${types.map(type => `({!join from=id to=proto_i}type_t:"${type}" AND NOT type_t:*) OR type_t:"${type}"`).join(" ")})` : "");
}
getDataStatus() { return this._deletedDocsStatus; }
@@ -578,7 +579,7 @@ export class SearchBox extends React.Component<SearchProps> {
// have the element transition to height: 0
requestAnimationFrame(function () {
element.style.height = 0 + 'px';
- thing ===`filterhead${id}` ? document.getElementById(`filterhead${id}`)!.style.padding = "0" : null;
+ thing === `filterhead${id}` ? document.getElementById(`filterhead${id}`)!.style.padding = "0" : null;
});
});