fixed errors in resize and move item percentile and value
This commit is contained in:
parent
fe46a2a74e
commit
09f1e2b733
|
@ -179,6 +179,15 @@ function createVisualConsole(
|
|||
y: e.newPosition.y,
|
||||
type: e.item.props.type
|
||||
};
|
||||
|
||||
if (e.item.props.processValue != undefined) {
|
||||
data.processValue = e.item.props.processValue;
|
||||
}
|
||||
|
||||
if (e.item.props.percentileType != undefined) {
|
||||
data.percentileType = e.item.props.percentileType;
|
||||
}
|
||||
|
||||
var taskId = "visual-console-item-update-" + id;
|
||||
|
||||
// Persist the new position.
|
||||
|
@ -270,6 +279,14 @@ function createVisualConsole(
|
|||
type: item.props.type
|
||||
};
|
||||
|
||||
if (item.props.processValue != undefined) {
|
||||
data.processValue = item.props.processValue;
|
||||
}
|
||||
|
||||
if (item.props.percentileType != undefined) {
|
||||
data.percentileType = item.props.percentileType;
|
||||
}
|
||||
|
||||
var taskId = "visual-console-item-update-" + id;
|
||||
// Persist the new size.
|
||||
asyncTaskManager
|
||||
|
|
|
@ -1817,6 +1817,7 @@ class Item extends CachedModel
|
|||
if (empty($data['id']) === true) {
|
||||
// Insert.
|
||||
$save = static::encode($data);
|
||||
|
||||
$result = \db_process_sql_insert('tlayout_data', $save);
|
||||
if ($result) {
|
||||
$item = static::fromDB(['id' => $result]);
|
||||
|
|
|
@ -110,6 +110,8 @@ final class SimpleValue extends Item
|
|||
$process_value = static::encodeProcessValue($data);
|
||||
if ($process_value !== null) {
|
||||
$return['type'] = $process_value;
|
||||
} else if (isset($data['processValue']) === true) {
|
||||
$return['type'] = $data['processValue'];
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
@ -150,7 +152,7 @@ final class SimpleValue extends Item
|
|||
*/
|
||||
private static function extractProcessValue(array $data): string
|
||||
{
|
||||
if (isset($data['processValue'])) {
|
||||
if (isset($data['processValue']) === true) {
|
||||
switch ($data['processValue']) {
|
||||
case 'none':
|
||||
case 'avg':
|
||||
|
|
Loading…
Reference in New Issue