public function Snap::optionsForm in Openlayers 7.3
@TODO What is this return? If it is the form, why is form by reference?
Overrides Base::optionsForm
File
- src/
Plugin/ Interaction/ Snap/ Snap.php, line 24 - Interaction: Snap.
Class
- Snap
- Class Snap.
Namespace
Drupal\openlayers\Plugin\Interaction\SnapCode
public function optionsForm(array &$form, array &$form_state) {
$form['options']['pixelTolerance'] = array(
'#type' => 'textfield',
'#title' => 'Pixel tolerance',
'#description' => 'Pixel tolerance for considering the pointer close enough to a segment or vertex for editing. Default is 10 pixels.',
'#default_value' => $this
->getOption('pixelTolerance', 10),
);
$form['options']['source'] = array(
'#type' => 'select',
'#title' => t('Source'),
'#empty_option' => t('- Select a Source -'),
'#default_value' => $this
->getOption('source', ''),
'#description' => t('Select the vector source.'),
'#options' => Openlayers::loadAllAsOptions('Source'),
'#required' => TRUE,
);
}