DO NOT MERGE: Implemented new in-canvas view buttons

The following changes are mainly to make the lengthy line 496 into shorter and clearer conditions.