From 437883701afe916dfe99d6f47942f9d82249552c Mon Sep 17 00:00:00 2001 From: Ozbolt Menegatti Date: Mon, 3 Feb 2020 06:13:14 +0100 Subject: [PATCH] showing multiword while hiding examples --- src/model/example.py | 3 +++ src/view/view.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/model/example.py b/src/model/example.py index 97c594d..8e1a153 100644 --- a/src/model/example.py +++ b/src/model/example.py @@ -44,6 +44,9 @@ class Example(Editable): def is_collocation(self): return self.get_view_type() == 2 + def is_multiword(self): + return self.get_view_type() != 1 + def get_view_type(self): # as per the bosses, these are the rules for different colors if type(self.inner) is CorpusExample: diff --git a/src/view/view.py b/src/view/view.py index efa7dc5..05dbf2d 100644 --- a/src/view/view.py +++ b/src/view/view.py @@ -138,7 +138,7 @@ class View: example_content.append(h("span.example-logdice", {}, example.other_attributes["logDice"])) parent_display = "inherit" - if not model.examples_shown and not example.is_collocation(): + if not model.examples_shown and not example.is_multiword(): parent_display = "none" clusters_display = "inherit"