GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — add `Deleted` as a graphic feature by kushalkolar · Pull Request #404 · fastplotlib/fastplotlib Conversation
|
|
@clewis7 notebook tests are failing due to a new change in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Had a couple of clarifying questions? Has been too long since I have looked at this. Otherwise, LGTM!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| def __init__(self, parent, value: bool): | ||
| super(Deleted, self).__init__(parent, value) | ||
|
|
||
| def _set(self, value: bool): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
So, this will get triggered when __del__ is called and self.deleted = True is set?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
How are we preventing users from if a graphic has been deleted to still having reference to the graphic and trying to say something silly like graphic.deleted=False? Will this throw an error if the graphic has already been deleted? I would assume so because there will be no reference.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
So, this will get triggered when
__del__is called andself.deleted = Trueis set?
Yes, Graphic.__del__ sets self.deleted = True https://github.com/fastplotlib/fastplotlib/pull/404/files#diff-a57994ecff1cde4e05c8175265219f0b5200da144ce8733b9eb560c09bcea7ddR179
How are we preventing users from if a graphic has been deleted to still having reference to the graphic and trying to say something silly like
graphic.deleted=False? Will this throw an error if the graphic has already been deleted? I would assume so because there will be no reference.
Since users are only given acccess to weakreferences, it will throw a reference error if they try to do anything with a deleted Graphic.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| pick_info = { | ||
| "index": None, | ||
| "collection-index": self._collection_index, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What is the difference here between index vs collection-index? Also, collection-index could be None if the graphic is not a CollectionGraphic, no?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It seems like index will always be None?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
index is buffer index, used for things like data and colors features. Not used here since it's not relevant
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* start legends, not functional yet * add faq (#400) * fix bug when remove_graphic() is used (#405) * add 'Deleted' as a graphic feature (#404) * very basic adding line legends works * use OrderedDict for legend items * allow accessing legend items via Graphic, updating colors works * legend mesh resizes properly * remove legend items and reorder works * enforce all legend labels to be unique * add legends property to PlotArea * checks for Graphic name * highlight linegraphic when legend item is clicked * legend is moveable * remove weird characters that were committed for some reason * progress on legend grid placement, not yet working * max_rows works for legend * just allow max_rows kwarg for legends, no cols * line that snuck in from another branch * small changes
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.