Giter VIP home page Giter VIP logo

enketo-image-customization-widget's Introduction

Image Customization Widget

To add this widget to your Enketo Express installation see this guidance.

Works on SVG media if the following is present for a question in XLSForm (or XForm):

  1. Appearance "image-customization" on select_one and select_multiple questions.
  2. The column "body::kb:image-customization" is present with a ${style} reference for that question.
  3. The settings sheet has a namespaces setting containing kb="http://kobotoolbox.org/xforms".
  4. The ${style} calculation produces a stringified JSON format with SVG style instructions. The special "selected" property is optional and can be used to override the selected style in the image-map widget (in case both are combined). The other properties correspond to an id attribute on a <path> in the SVG. Multiple style properties can be customized. See example:
{
	"selected": {
		"stroke": "yellow",
		"stroke-width": 4
	},
	"AL": {
		"fill": "#ccc"
	},
	"CO": {
		"fill": "#ababab"
	}
}

Note that this widget is a custom hack for which we cannot device a proper sane XForm syntax. It is therefore not suitable for inclusion in the common Enketo tools and the ODK XForms specification.

enketo-image-customization-widget's People

Contributors

jeremi avatar jnm avatar martijnr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.