class documentation

class ImageView(View): (source)

Constructor: ImageView(**kwargs)

View In Hierarchy

Displays an image.

Examples:

def execute():
    return {"image": "https://voxel51.com/your/image.png"}

def resolve_output(self, ctx):
    schema = {
        "height": "100px",
        "width": "100px",
        "alt": "My image alt text",
        "href": "https://voxel51.com",
        "operator": "@my/plugin/my_operator" | self.my_operator (in Python Panels),
        "prompt": False,
        "params": {"foo": "bar"},
    }
    outputs = types.Object()
    outputs.define_property(
        "image",
        types.String(),
        label="Image",
        view=types.ImageView(),
    )
    return types.Property(outputs)
Parameters
heightthe height of the image
widththe width of the image
altthe alt text of the image
hrefthe url to navigate to when the image is clicked
operatorthe name of the callable operator to execute when the image is clicked
promptwhether to prompt the user before executing the operator
paramsthe parameters to pass to the operator
Method __init__ Undocumented

Inherited from View:

Method clone Undocumented
Method kwargs_to_json Undocumented
Method to_json Undocumented
Instance Variable caption Undocumented
Instance Variable component Undocumented
Instance Variable componentsProps Undocumented
Instance Variable container Undocumented
Instance Variable description Undocumented
Instance Variable label Undocumented
Instance Variable placeholder Undocumented
Instance Variable read_only Undocumented
Instance Variable space Undocumented
Instance Variable _kwargs Undocumented
def __init__(self, **kwargs): (source) ΒΆ