photo

photo is a juci widget built for taking or choosing photos from the device using $m APIs in a user friendly and easy manner. Tapping on the container pops up a confirm dialog to choose or take picture from the device.

  • Extends basecontrol
  • Syntax

    <div data-juci="photo" data-label="Photo"></div>
    <div data-juci="photo" data-label="Databound" data-bind="ref: photo" data-uri="true"></div>
    Requires mowbly to be loaded.

    Attributes

    • data-uri {Boolean}
      True for data uri string, else URL reference by default.
    • data-juci {String}
      A string with value photo.
    • data-photo-options {Object}
      Configuration for the photo
      data-photo-options="width: 300, height: 400"
      See:
      $m.choosePic

    Events

    • cancel(eventObj)
      Fires when the user has cancelled choosing or taking a picture. Can be used to update user interface.
      Parameters:
    • finish(eventObj)
      Fires after the user has chosen or taken a picture successfully. Can be used to update user interface.
      Parameters:
    • photoerror(eventObj)
      Fires when the chosen picture is loaded with errors in the photo control.
      Parameters:
    • photoload(eventObj)
      Fires when the chosen picture is loaded successfully in the photo control.
      Parameters:
    • photooptions(eventObj)
      Fires before the user is directed to the camera or a gallery.
      Parameters:
      • eventObj{EventObject}
        • options{Object}
          The configuration for $m.choosePic() and $m.capturePic().
    • start(eventObj)
      Fires when the user taps on the control to start choosing or taking a picture. Can be used to update user interface.
      Parameters: