def loaded_file_on_mouse_click(self, event):
        """Act on mouse left button pressing.

        Act based on mouse position.
        """
        ### retrieve the mouse position
        mouse_pos = event.pos

        ### check objects on screen for collision

        gm = APP_REFS.gm

        for obj in chain(
            self.switches,
            gm.text_blocks.get_on_screen(),
            gm.nodes.get_on_screen(),
            gm.preview_toolbars.get_on_screen(),
            gm.preview_panels.get_on_screen(),
        ):

            if obj.rect.collidepoint(mouse_pos):

                try:
                    method = obj.on_mouse_click
                except AttributeError:
                    pass
                else:
                    method(event)

                break

        ### otherwise, if no collision is detected with
        ### any node, just set the "clicked_mouse" flag on
        else:
            self.clicked_mouse = True
Act on mouse left button pressing.

        Act based on mouse position.
        
nodezator/winman/states/loadedfile.py