Template:FileContentsByBot/areas/doc
Jump to navigation
Jump to search
Contains the required markup to represent the coordinates and dimension detected by a bot.
Usage
{{FileContentsByBot/areas |1= |left1= |top1= |height1= |width1= |left2= |top2= |height2= |width2= |10= }}
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
1 | The item's type. E.g. eye, facePosition. This must be a valid class name (HTML). | empty | required | |
left1 | The first item's leftmost coordinate in px. Number only. Type: Integer. Field's class: type1-position-left. | empty | required | |
top1 | The first item's topmost coordinate in px. Number only. Type: Integer. Field's class: type1-position-top. | empty | required | |
height1 | The first item's height in px. Number only. Type: Integer. Field's class: type1-height. | empty | required | |
width1 | The first item's width in px. Number only. Type: Integer. Field's class: type1-width. | empty | required | |
left2 | The second item's leftmost coordinate in px. Number only. Type: Integer. Field's class: type2-position-left. | empty | optional | |
top2 | The second item's topmost coordinate in px. Number only. Type: Integer. Field's class: type2-position-top. | empty | optional | |
height2 | The second item's height in px. Number only. Type: Integer. Field's class: type2-height. | empty | optional | |
width2 | The second item's width in px. Number only. Type: Integer. Field's class: type2-width. | empty | optional | |
10 | empty | optional |
Additional information
The template is intended to be used in the following namespaces: the File namespace
The template is intended to be used by the following user groups: Bots
Placement:
inside e.g. {{FileContentsByBot/Faces}} (as parameter eyes)
See also
Localization
This template is not intended to be localized.
// Example reading all face's coordinates
$('#fileContentsByBot').find('.face-detected-by-bot').each(function(i, el) {
var $el = $(el),
id = $el.find('.face-detected-by-bot-id').text(),
$eyePos = $el.find('.face-detected-by-bot-eyes');
alert("Eye 1 of face " + id + " is at " + $eyePos.find('.eye1-position-left').text() + ", " + $eyePos.find('.eye1-position-top').text() + "px.")
});