Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/component/toolbox/feature/DataView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ export interface ToolboxDataViewFeatureOption extends ToolboxFeatureOption {

buttonColor?: ColorString
buttonTextColor?: ColorString

buttonExtraCssText?: string
}

class DataView extends ToolboxFeature<ToolboxDataViewFeatureOption> {
Expand Down Expand Up @@ -375,7 +377,8 @@ 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 buttonExtraCssText = model.get('buttonExtraCssText') || '';
buttonContainer.style.cssText = 'position:absolute;' + buttonExtraCssText;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buttonExtraCssText looks like it is for a single button rather than the button container, and can be misleading.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you suggest other naming than ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about buttonContainerExtraCssText?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plainheart @Ovilia I have renamed it to suggested buttonContainerExtraCssText.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any progress on this one ? :)


// eslint-disable-next-line max-len
let buttonStyle = 'float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px';
Expand Down Expand Up @@ -469,7 +472,8 @@ class DataView extends ToolboxFeature<ToolboxDataViewFeatureOption> {
textareaColor: '#fff',
textareaBorderColor: '#333',
buttonColor: '#c23531',
buttonTextColor: '#fff'
buttonTextColor: '#fff',
buttonExtraCssText: 'right:0;bottom:5px;'
};

return defaultOption;
Expand Down
5 changes: 5 additions & 0 deletions test/dataView.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading