Ovilia commented on code in PR #20969:
URL: https://github.com/apache/echarts/pull/20969#discussion_r2148986605


##########
src/component/toolbox/feature/DataView.ts:
##########
@@ -375,7 +378,12 @@ class DataView extends 
ToolboxFeature<ToolboxDataViewFeatureOption> {
         const blockMetaList = result.meta;
 
         const buttonContainer = document.createElement('div');
-        buttonContainer.style.cssText = 
'position:absolute;bottom:5px;left:0;right:0';
+        const buttonPosition = model.get('buttonPosition') || {};
+        buttonContainer.style.cssText = 'position:absolute;top:' + 
buttonPosition.top
+            + ';left:' + buttonPosition.left
+            + ';right:' + buttonPosition.right
+            + ';bottom:' + buttonPosition.bottom
+            + ';';

Review Comment:
   Most of the `top/left/right/bottom` options uses `number` type for pixel 
values, and most of them support percentage position relative to the container. 
I'd suggest using `buttonExtraCssText` instead of `buttonPosition`, similar to 
[tooltip.extraCssText](https://echarts.apache.org/en/option.html#tooltip.extraCssText).
 In this way, we can provide more flexibility to developers and it's easier to 
implement.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to