Skip to content

Commit

Permalink
revert bitmap artifact change
Browse files Browse the repository at this point in the history
  • Loading branch information
Xintong Xia committed Mar 28, 2019
1 parent b86913b commit dd18f6f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
2 changes: 1 addition & 1 deletion examples/website/map-tile/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class App extends PureComponent {
}

_renderLayers() {
const {autoHighlight = true, highlightColor} = this.props;
const {autoHighlight = true, highlightColor = [60, 60, 60, 40]} = this.props;

return [
new TileLayer({
Expand Down
4 changes: 1 addition & 3 deletions modules/layers/src/bitmap-layer/bitmap-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ import fs from './bitmap-layer-fragment';
const DEFAULT_TEXTURE_PARAMETERS = {
[GL.TEXTURE_MIN_FILTER]: GL.LINEAR_MIPMAP_LINEAR,
// GL.LINEAR is the default value but explicitly set it here
[GL.TEXTURE_MAG_FILTER]: GL.LINEAR,
[GL.TEXTURE_WRAP_S]: GL.CLAMP_TO_EDGE,
[GL.TEXTURE_WRAP_T]: GL.CLAMP_TO_EDGE
[GL.TEXTURE_MAG_FILTER]: GL.LINEAR
};

const defaultProps = {
Expand Down
24 changes: 2 additions & 22 deletions website/src/components/demos/map-tile-demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ import {App, INITIAL_VIEW_STATE} from 'website-examples/map-tile/app';
export default class LineDemo extends Component {
static get parameters() {
return {
autoHighlight: {displayName: 'Enable autoHighlight', type: 'checkbox', value: true},
highlightColor: {displayName: 'Highlight Color', type: 'color', value: [60, 60, 60]},
highlightColorOpacity: {
displayName: 'Highlight Color Opacity',
type: 'range',
value: 40,
step: 1,
min: 0,
max: 255
}
autoHighlight: {displayName: 'Enable autoHighlight', type: 'checkbox', value: true}
};
}

Expand Down Expand Up @@ -50,17 +41,6 @@ export default class LineDemo extends Component {
render() {
// eslint-disable-next-line no-unused-vars
const {params, data, ...otherProps} = this.props;
const highlightColor = [
...params.highlightColor.value.slice(0, 3),
params.highlightColorOpacity.value
];

return (
<App
{...otherProps}
autoHighlight={params.autoHighlight.value}
highlightColor={highlightColor}
/>
);
return <App {...otherProps} autoHighlight={params.autoHighlight.value} />;
}
}

0 comments on commit dd18f6f

Please sign in to comment.