making some test for focal point picker precision
This commit is contained in:
parent
880a037228
commit
0919151813
|
|
@ -1 +1 @@
|
|||
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'cf77ee822bf6010cfa16');
|
||||
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '20350dab69404054c069');
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ function Edit({
|
|||
focusIndex
|
||||
} = attributes;
|
||||
function handleChangeobjectPosition(objectPosition) {
|
||||
console.log('position', objectPosition);
|
||||
setAttributes({
|
||||
objectPosition
|
||||
});
|
||||
|
|
@ -118,7 +119,14 @@ function Edit({
|
|||
objectScale
|
||||
});
|
||||
}
|
||||
console.log(behaviourType, clientId);
|
||||
function resolvepoint(point) {
|
||||
console.log('point', point);
|
||||
return {
|
||||
x: point.x,
|
||||
y: point.y
|
||||
};
|
||||
}
|
||||
console.log(objectPosition);
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
|
||||
className: "focus-point-modification-pannel",
|
||||
title: "Object de comportement clickable"
|
||||
|
|
@ -157,7 +165,8 @@ function Edit({
|
|||
value: objectPosition,
|
||||
onChange: focalPoint => {
|
||||
handleChangeobjectPosition(focalPoint);
|
||||
}
|
||||
},
|
||||
resolvePoint: resolvepoint
|
||||
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.RangeControl, {
|
||||
label: "Scale",
|
||||
value: objectScale,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
<?php return array('dependencies' => array('react', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '827526b833aac8a953d1');
|
||||
<?php return array('dependencies' => array('react', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '5ef52644f751f125af68');
|
||||
|
|
|
|||
|
|
@ -296,6 +296,7 @@ function Edit({
|
|||
focusIndex
|
||||
} = attributes;
|
||||
function handleChangeobjectPosition(objectPosition) {
|
||||
console.log('position', objectPosition);
|
||||
setAttributes({
|
||||
objectPosition
|
||||
});
|
||||
|
|
@ -335,7 +336,14 @@ function Edit({
|
|||
objectScale
|
||||
});
|
||||
}
|
||||
console.log(behaviourType, clientId);
|
||||
function resolvepoint(point) {
|
||||
console.log('point', point);
|
||||
return {
|
||||
x: point.x,
|
||||
y: point.y
|
||||
};
|
||||
}
|
||||
console.log(objectPosition);
|
||||
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
|
||||
className: "focus-point-modification-pannel",
|
||||
title: "Object de comportement clickable"
|
||||
|
|
@ -374,7 +382,8 @@ function Edit({
|
|||
value: objectPosition,
|
||||
onChange: focalPoint => {
|
||||
handleChangeobjectPosition(focalPoint);
|
||||
}
|
||||
},
|
||||
resolvePoint: resolvepoint
|
||||
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.RangeControl, {
|
||||
label: "Scale",
|
||||
value: objectScale,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -37,6 +37,8 @@ export default function Edit({
|
|||
} = attributes;
|
||||
|
||||
function handleChangeobjectPosition(objectPosition) {
|
||||
console.log('position', objectPosition);
|
||||
|
||||
setAttributes({ objectPosition });
|
||||
}
|
||||
function handleChangeTitle(focusTitle) {
|
||||
|
|
@ -69,8 +71,15 @@ export default function Edit({
|
|||
function setScale(objectScale) {
|
||||
setAttributes({ objectScale });
|
||||
}
|
||||
function resolvepoint(point) {
|
||||
console.log('point', point);
|
||||
return {
|
||||
x: point.x,
|
||||
y: point.y,
|
||||
};
|
||||
}
|
||||
|
||||
console.log(behaviourType, clientId);
|
||||
console.log(objectPosition);
|
||||
return (
|
||||
<>
|
||||
<InspectorControls>
|
||||
|
|
@ -143,6 +152,7 @@ export default function Edit({
|
|||
onChange={(focalPoint) => {
|
||||
handleChangeobjectPosition(focalPoint);
|
||||
}}
|
||||
resolvePoint={resolvepoint}
|
||||
/>
|
||||
<RangeControl
|
||||
label="Scale"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user