Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various features added #26

Merged
merged 21 commits into from
Mar 25, 2019
Merged

Conversation

Dev-iL
Copy link
Member

@Dev-iL Dev-iL commented Mar 25, 2019

Description

See commit messages of individual commits included in this PR.

Motivation and Context

How Has This Been Tested?

Functionality was tested manually during development, partially on R2018b and partially on R2019a.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Dev-iL added 21 commits July 24, 2018 15:22
This was tested on tested on R2018a. The code below demonstrates what the new function does:
```matlab
% Create figure:
uiFig = uifigure('Position', [100 100 800 130]); mlapptools.setTimeout(uiFig,15);
hT(1) = uitable(uiFig,'Data', magic(3), 'Position', [020 020 300 80]);
hT(2) = uitable(uiFig,'Data', magic(4), 'Position', [350 010 400 100]);
% Get IDs:
ID1 = mlapptools.getTableCellID(hT(1), 1:3, 1:3 );
ID2 = mlapptools.getTableCellID(hT(2), 1:4, 3*ones(1,4));
pause(5); % Wait to ensure tables are ready.
% Apply styles:
hWW = mlapptools.getWebWindow(uiFig);
arrayfun(@(x)mlapptools.setStyle(hWW, 'background', 'red',    x), ID1);
arrayfun(@(x)mlapptools.setStyle(hWW, 'background', 'yellow', x), ID2);
```
Added some mechanisms to reduce the likelihood of errors in getWebElements.
It is now possible to apply the same style to multiple elements "in one go".
- Removed annoying empty spaces at the ends of lines.
- Set tab width to 2.
- The new methods are intended for adding CSS classes to HTML nodes.
- README.md updated accordingly.
..although it isn't terribly useful. The main usefulness is likely for traversing the DOM (getting to parents / children of this id).

Perhaps in the future we'll return a more useful WidgetID for uitables.
This means that the style loss on resize is no longer an issue.
+ Small fix for the previous commit (coding style).
TODO: add `getTableCellID` to API documentation.
- Updated README accordingly.
- Minor other README updates.
Updated README accordingly.
+ Also fixed some comments in mlapptools.
+ TODO: add `getTableCellID` to the readme.
Also:
- Added a warning.
- Slightly modified some warning text.
- Updated functionSignatures.json accordingly.
- TODO: mention in main readme.
A canvas is now returned for a uiaxes input, along with a warning.
In R2019a a <img> node is returned, as opposed to earlier versions, in which <canvas> would be returned.
@Dev-iL Dev-iL merged commit b969471 into StackOverflowMATLABchat:develop Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant