Example #1
0
def location():
    loc = Location()
    with edit_readonly(loc):
        loc.href = "http://localhost:5006"
        loc.hostname = "localhost"
        loc.pathname = ""
        loc.protocol = 'http'
        loc.search = ""
        loc.hash = ""
    return loc
Example #2
0
    def _set_busy(self, busy):
        """
        Sets panel.state to busy if available.
        """
        if 'busy' not in state.param:
            return  # Check if busy state is supported

        from panel.util import edit_readonly
        with edit_readonly(state):
            state.busy = busy
Example #3
0
 def callback_busy_state(event):
     with edit_readonly(state):
         state.busy = True
     cb = functools.partial(callback, event)
     self.chart.document.add_next_tick_callback(cb)
     self.chart.document.add_next_tick_callback(release_state)
Example #4
0
 def release_state():
     with edit_readonly(state):
         state.busy = False