grid width/height

This commit is contained in:
Joao Moreno 2018-04-26 16:06:35 +02:00
parent 79cc0157e4
commit cef7a3a8c0
3 changed files with 16 additions and 3 deletions

View file

@ -0,0 +1,11 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-grid-view {
position: relative;
overflow: hidden;
width: 100%;
height: 100%;
}

View file

@ -5,6 +5,7 @@
'use strict';
import 'vs/css!./gridview';
import { Event, anyEvent, Emitter } from 'vs/base/common/event';
import { Orientation } from 'vs/base/browser/ui/sash/sash';
import { SplitView, IView } from 'vs/base/browser/ui/splitview/splitview';

View file

@ -26,15 +26,16 @@
onDidChange: Event.None,
layout() { },
render(el) {
el.style.backgroundColor = `hsl(${Math.round(Math.random() * 360)}, 72%, 72%)`;
el.textContent = `hello${id}`;
console.log('RENDER');
}
};
}
grid.addView(createView(), 200, [0]);
grid.addView(createView(), 200, [1]);
grid.addView(createView(), 200, [2]);
grid.addView(createView(), 50, [0]);
grid.addView(createView(), 50, [1]);
grid.addView(createView(), 50, [2]);
});
</script>
<style>